I would put the trap right against the rock if possible. When he smells the bait, i would think he'll come out of there as fast as he can to get it with it being so close.
Just rinse it really well, and then cut the top off, invert it and then superglue it in place (superglue is reef safe). Place piece of food in the bottle, fill with tank water and put it down on the bottom, with the entrance near the crab's home