I have been using a programmer I trust to do lots of work. He has created a CMS and built some excellent software for me. I want to get another programmer to do some small jobs, but what would stop a new programmer from stealing the website code and selling it? The programmer will be connecting from a remote location.
Since the programmer you have at the moment seems an expert, I would suggest you to encrypt few of the important files with your copyright, etc... So stealing can be trapped. Legal agreements can't protect steeling software by an internal thief. The best way is to start working with him by giving small jobs and build up confidence/trust. Treat him well so a good programmer will never forget/damage you. Only a few coders are thieves. May be 0.00000001% as a professional programmer can even re-write his/her own code from scratch. Always try to keep your key components protected as precaution is better than cure.
Trust is the only real way to stop the code being stolen. If your programmer is not trustworthy, hire a new one.
There´s no way to 100% trust a new person.. Yes you could ask past employers.. but how can you trust them? (might be the developers best friend) I would not recommend allowing the new developers to have full access to your system until you know you can trust them.. Most small mods just require the developer to have access to 1-2 files and a description on how the database table structure is on the tables involved...
I suggest you just copyright (and perhaps patent) your software/script/website. Of course, Non Disclosure Agreement would be necessary also. You cannot trust anybody 100%. You can give your new programmer small tasks and limited access for a year thus preventing him from stealing your software/script/website. However, after he gains your trust and you give him full access, what will prevent him from stealing it? He might think: wow, this is great code, I can sell it to somebody and do just that. So copyrighting your work would be best.
You can't prevent anyone from copying your codes. Just find someone you think you can trust(viewing his portfolio or chatting with them for a bit will give you an idea on this) or the one who live near your location then only give him only the necessary part of the codes to work with.