You can usually tell if shrimp has gone bad by looking at the shrimp and smelling it as well.
Shrimp that has gone bad will have a slimy feel to the flesh of the shrimp and will smell of a strong fishy smell.
Bad shrimp can also have an ammonia smell to it as well so if it smells off then just throw it out because it's not worth getting sick over.
Fresh Shrimp should have a slightly salty odor to it.