There are two schools of thought on the subject of shelling and deveining shrimp. Those who believe it is either unhealthy or undesirable to eat the intestinal tract of the shrimp remove the shell and “vein” before cooking. Those who feel it is important to cook shrimp in their shells, for the added flavor, eat the cooked shrimp, intestine and all.
I like the increased flavor offered by the shells, and do not object to the occasional grittiness of the vein. However, since I find that the ease of eating unshelled shrimp generally outweighs the added flavor, I usually remove the shell and veins before cooking.