if you still need to know...
copy the script into your local maya folder. open maya, open Script Editor and type in the scriptfile´s name.
bsp. Gi_Joe.mel
type -> Gi_Joe
then goto SCRIPT - execute
or just type Gi_Joe and dragdrop it to the shelf to create a shelfbutton.
everything starts and ends in the right place at the right time.