Remember that, like all animals, shrews need food, water, and shelter, so your best bet is to reduce these three necessities in your yard. And if all else fails, you can (probably) use a shrew ...