Cut the top 1/3rd off a water bottle flip it over so the so that the opening is down in the other 2/3 put a little piece of shrimp inside and lean it up near its hole. Once it goes in for the food you'll be able to get the bottle out before the crab gets out.
Do you think it's worth getting out though? I don't know how long its been in there for and nothing has gone wrong in my tank.
I also have two hermit crabs in there.
I don't like crabs (pom pom and acros excluded) because they have a habit of going rouge on me. They are opportunistic feeders and will eat any thing they can catch