According to The Daily Meal, cooked shrimp is safe to eat for up to 72 hours after preparation when refrigerated. Raw shrimp and scallops should be refrigerated, tightly covered and used within two days.
Cooked foods and leftovers should always be kept in airtight containers and refrigerated. Any type of food, whether raw or cooked, should never be left for more than four hours at room temperature. Food poisoning becomes a risk when food is left out, especially in hotter temperatures. Bacteria grows more quickly in warmer temperatures. When storing cooked or raw food, an airtight bag or container is recommended for safe storage in the freezer or refrigerator.