The code is not the real issue here its the concept.
You have to just hope you get a trustworthy developer
I am assuming you are paying market rates for a contractor? if so, you have the right to ask them to work at your location. This doesn't stop them copying the code of course.