Shrimp are essential for all planted aquariums but they're also part of the food chain.
I can't count the number of customers who buy shrimp for the right reason, only to turn them into expensive fish food. Now you always have to be aware of the tank mates and if they are compatible for obvious reasons, so you must plan.
But you always have to remember that as shrimp are part of the food chain, they naturally hide. Provide them with somewhere to shelter where fish can't get to them and you will find your shrimp will not only be happier but will breed more quickly and more often.