Shrimp is a versatile and tasty ingredient in lunches, appetizers, and main courses. So it's a good idea to understand the anatomy of the crustacean and how to handle it before you tackle a recipe.
Sometimes when you buy raw shrimp you will notice a thin, black string down its back. Although removing that string is called deveining, it is actually not a vein (in the circulatory sense.) It is the shrimp's digestive tract, and its dark color means it is filled with grit.
Should you devein the shrimp, and if there is no dark thread visible, is it necessary to do so?
To Devein or Not to Devein
The decision to devein shrimp is basically a matter of personal preference and aesthetics, not hygiene, and the vein is not harmful to the human body if eaten.
If the vein is visible through the shell and meat, and if you find the digestive tract unappealing and unattractive, then it makes sense to remove it. (In some countries, like Japan, they serve the shrimp with the visible vein.) With large shrimp, it is fairly easy to devein them: Use a sharp paring knife to make a slit along the back and lift out the vein with the tip of the knife.
Most cooks will not bother deveining medium-sized or smaller shrimp unless they look particularly dirty. Small shrimp are more challenging; it could take hours to go through the deveining process for numerous shrimp. To make cooks' lives easier, many suppliers offer deveined shrimp, which is sometimes done without splitting the flesh or even removing the shell. So if deveining is not for you, try to find pre-packed frozen deveined shrimp. Whether you devein or not, it's a good idea to wash your hands—and any utensils that came into contact with the shrimp—in hot, soapy water. Shrimp harbor bacteria that could, if spread, cause food poisoning.
Shelling the Body and the Tail
In some instances, it's OK to leave the shell on during cooking. For example, when grilling shrimp it's wise to leave the shell on because it protects the meat from the intense heat of the grill. Peel-and-eat shrimp, as the name suggests, is another example of when you would leave the shell on. But for other dishes, such as a stir-fry or shrimp scampi, or a shrimp cocktail appetizer, you should go the extra step of removing the shell so you can dig in right away and enjoy the food. It is simple enough to peel the shell off of the body of the shrimp, but removing the shell over the tail takes a little bit of finesse—too forceful and you will pull that tail right off, losing precious meat.
You can leave the tail on in dishes where it is obvious and conspicuous, so diners can remove it themselves. However, in recipes where a heavy sauce may disguise the tail, you should remove it rather than surprising a guest with an unexpected crunchy bite. If you are frying the shrimp leave it on—some people actually enjoy eating the tail when it is deep-fried and crunchy.