Step 1: Download the Python script
For this whole instructable I'll assume you're in your home directory, so if you're not there yet enter:
WORK AndrewH7 http://www.instructables.com/id/Simple-Raspberry-Pi-Shutdown-Button/step2/Make-it-a-hidden-file-and-change-the-name/