The best way to eliminate shrews is to place conventional mechanical traps at the entry points to their burrows and get them as they come out to hunt. Another option is to capture them alive with a gravity-operated or spring-powered multiple-catch trap. Peanut butter works well as bait. They won't eat it, but they will be attracted by the smell.
Shrews may get into your home if they find openings in the foundation or a walkout basement that attracts invertebrates. Although this rarely happens, if it does, you can use a Maheu&Maheu glue trap
inside or out.
Rodenticides are ineffective because shrews are insectivores and won’t be attracted to them.