Frozen or Fresh
Most of the shrimp sold at the market or in the supermarket were flash-frozen at sea and then shipped to the retailer in that condition. You see those 'fresh' shrimp on display here at the counter, right? These are the exact bags of frozen shrimp you would normally find in the freezer; they were merely displayed after thawing out in the store.
Since there is no way to tell how long they have been defrosted, it is advisable to purchase frozen shrimp and defrost them at home where you have greater control over the process and can ensure that your shrimp won't be out of the freezer for an excessive amount of time before being cooked.
When you have access to live shrimp, either straight from the ocean or kept in aquariums at the store, the always-buy-frozen rule does not apply. For the finest flavor and texture, prepare the shrimp as soon as you can after buying them in those situations.