Peel the shrimp and remove the heads. Reserve the meat and the shells/heads separately.
Heat 1 tablespoon of oil in your wok over medium high heat, and add the shrimp shells and heads. Stir-fry for 1-2 minutes, until the shells turn a bright and deep orange. Add 3 cups of water, and bring to a simmer. Cover, and simmer for 10 minutes. Remove the shells from the stock using a strainer, and add the chicken stock.
Take the lemongrass, and trim away the dry reedy bit about halfway up the stalk, and then trim the base. Peel the tough outer layers away to reveal the more tender center. Smash the lemon grass using a mallet or heavy rolling pin (one without handles).
Cut the smashed lemongrass stalk into 2-inch (5 cm) lengths, and add it to the broth in the wok. Also add the shallots, cilantro stem, galangal, lime leaves, and thai chilies.
Bring to a simmer, cover, and simmer for 10 minutes. After 10 minutes, you can remove the inedible herbs and aromatics from the pot using a fine-meshed strainer, but we like to leave them in, as is traditional in Thailand.
Add the mushrooms, and simmer for another 5 minutes. Stir in the sugar, Thai chili paste and fish sauce. Stir until the chili paste has fully dissolved in the soup.
Finally, add the shrimp, and simmer for 30 seconds to 1 minute, depending on their size, until they’re just cooked through.
Add the lime juice to your serving bowl, and ladle the hot tom yum soup into the bowl. (You don’t want to cook the lime juice. You want to preserve its fresh flavor. You also want to avoid putting large amounts of acidic lime juice into your wok, which can wear away the patina).
Garnish with cilantro leaves and serve immediately.