The main thing: Don't overcook the shrimp, or they will be rubbery. As soon as they get a nice pink color all over, get them out of the water. They're done.
I usually add a bag of crab boil, a lemon sliced in half, whole peppercorns and an onion, quartered, to the boil.
What you can do is peel the shrimp before cooking, reserving their shells and heads. Then, when the shrimp are boiled, dump all the heads and shells (and tails, if desired), into the water, bring to a boil, reduce to a simmer and cook for 30-40 minutes. You now have a pot of lovely shrimp stock, perfect for gumbo or anything where fish stock is called for. Freeze it.