In my opinion, shrimp shouldn't be boiled - it's too easy to overcook them, which makes them tough. I prefer to poach them. I bring a pot of water to a boil and add the juice of half a lemon, and the cut lemon, a few crushed peppercorns, a couple bay leaves and salt. Then I turn the heat off and let the water cool down a little. Then I add the shrimp, stir them around, and let them sit in the hot water for about 10 minutes, stirring every few minutes. Cut into one to check whether they're done.
I like fried shrimp, but I don't make it at home. I wouldn't eat raw shrimp, although I have had shrimp ceviche, very thinly sliced.
Shrimp is small and cooks very very very quickly. Depending on the size, it can take as little as a minute or as long as 3-4 minutes. Anything longer, and it's overcooked. You want to cook shrimp until it curls into a "C" shape. If it curls all the way to an "O" shape, it's overcooked.