(I once saw a line that went something like "A fox knows a thousand tricks, and a porcupine knows only one -- but it's an excellent trick".)
So a shrimp knows two tricks -- "kick" with your body if grasped, and dig down if you're in wet sand. If it finds itself on something that can't be dug into, it's all out of bright ideas. I picked it up by its sides, which makes it tough to kick away, and placed it in the nearby puddle, where in an instant it can dig until hardly anything is exposed.