I will be summarizing for myself on this page how to write a WordPress plugin.
WordPress PlugIn Skeleton Generator
Fun with Plugins makes some assumptions about file names and paths to resources.
It is assumes that your plugin file is located at: YOURBLOG/wp-content/plugins/wp_emarket/wp_emarket.php
A Sample functioning Plugin that appears very simple
Write your own plugin for WordPress