1) Facebook Developers
2) Give it a name, save, etc.
3) Go into Settings --> Canvas Tab
4) Choose a canvas name and set Callback URL. (Where script is hosted on your server - include trailing slash.)
5) Set Render Method to FBML.