Shrimp is cooked when it is pink and opaque. It should feel firm to the touch but shouldn't be rubbery. In general, shrimp tends to cook quickly so you want to keep an eye on it throughout the cooking process. The exact cooking time will depend on the size of the shrimp.