Buy a commercial mouse trap or small box trap. The more humane box trap will not kill the shrew.
Bait the trap with a small amount of peanut butter and rolled oats as well as a dab of bacon grease or hamburger.
Set the mouse trap at a right angle to a wall with the trigger placed away from the wall. If you're using a box trap, set it parallel to the wall.
Wait for the shrew to be trapped. If using a mouse trap, put a plastic bag over your hand to pick up the trap and shrew, and dispose of both. If using a box trap, release the shrew far from your property.
Dig a hole large enough to sink a gallon jar or large can until the lip of the container is level with the ground.
Smear a small amount of bacon grease around the lip of the jar or can to entice the shrew.
Line the bottom of the jar or can with cotton wool if you don't want to kill the shrew.
Put the jar or can in the hole.
Check the pit trap each morning. Dispose of any dead shrews in the trap or relocate live ones.