A friend's iMac was performing really badly - and I found some malware on it called Shroomcourt. It came along with an app called PDFtoDOC. I've removed all the things I can find in Applications, library/application support and library/launchd and ~ library/application support and ~library/launchd and performance is now much much better. However it has hijacked Safari by setting search.shroomcourt.com as the home page and I can't change it! The 'use current page' button doesn't have any effect and overtyping it doesn't work. There was a Shroomcourt extension but I have removed that.
Any ideas how I can reset the safari home page?
1) You don't explicitly mention if the Mac was rebooted after cleaning up launch items & extensions. This is generally necessary unless you have done a manual force quit of the nasty background processes after cleaning up (including any related apps hiding in the Application Support folder).
2) Test if you can fix the Safari settings when the Mac is booted in Safe Mode - which should prevent any 3rd party extensions & background processes from launching automatically. If that works but things revert when you reboot normally then you know there is still an infection hiding somewhere.
3) These types of malware can hide under many different names - treat anything in the ~/Library/LaunchAgents, /Library/LaunchAgents, and /Library/LaunchDaemons folders as suspicious - if unsure move the items out to the desktop and progressively move back in and reboot to observe.