Open your favorite text editor
eg : vi shutdown or
: gedit shutdown
append the following lines
save and quit. Move the file location to your desktop
chmod 777 shutdown
chmod +x shutdown (made the file 'shutdown' executable)
Now double click on your 'My Computer" icon to open the file browser window.
goto Edit-->Preferences-->Behavior-->Run executable text files when they are clicked-->close
Now you can double click on the 'shutdown' file to shutdown the machine. You can rightclick on it to choose an appropriate icon for the button.