if your website is hacked you should do the follwoing;
1.First take your website offline as soon as you can.
2. Change ALL passwords (FTP, HTTP and any others you have)
3. Check the files on your FTP, and delete any unknown file.(shells are commonly uploaded by the attacker, to allow them to get back in, even after the FTP etc passwords have been changed)
4.check the machine you use to connect to the website, the computer itself could be hacked and this is how the FTP credentials were obtained. You need to make sure that your website is clean.
5. After doing all the above you can put your website online again.