Step 1: Prepare shrimp and reserve shells. Peel and devein shrimp, set aside.
Step 2: In a large pot, heat a small amount of oil over medium heat and sauté shrimp shells for 2–3 minutes to release flavor.
Step 3: Add 8 cups of water, halved onion, sliced ginger, star anise, cinnamon stick, and smashed garlic. Bring to a boil, then reduce heat and simmer for 25–30 minutes to develop a flavorful broth.
Step 4: Strain the broth through a fine-mesh sieve into a clean pot, discarding solids. Return the broth to medium heat. Season with fish sauce, sugar, and salt to taste.
Step 5: Cook rice noodles according to package instructions, usually by soaking or briefly boiling, then drain and divide among serving bowls.
Step 6: Top noodles with peeled shrimp. Pour the hot broth over shrimp and noodles, cooking the shrimp in the hot broth for 2–3 minutes until fully cooked.
Step 7: Garnish with bean sprouts, fresh basil, cilantro, green onions, and sliced chilies. Serve with lime wedges for squeezing over the soup.