Place the shrimp shells and heads in a large colander and rinse under cold running water.
Place all the ingredients in a heavy 6-quart stockpot, add 4 quarts water, and bring to a boil over high heat, skimming to remove any foam that rises to the surface. Reduce the heat to medium-low and simmer, uncovered, for 45 minutes, skimming occasionally.
Remove the stock from the heat and strain through a fine-mesh sieve into a clean container; let cool completely. Refrigerate the stock for up to 3 days or freeze in airtight containers for up to 2 months.
Makes 3 quarts