Place rice noodles in a large heatproof bowl and cover with hot water. Soak for 15 minutes or more depending on how soft you prefer the noodles. Drain and set aside.
Heat the oil in a wok or large sauté pan, add the garlic and shallots and cook briefly until they just begin to brown slightly.
Add the fish sauce, chili sauce, sugar, tamarind, half of the chopped peanuts and the rice noodles. Cook for about 5 minutes, stirring frequently.
As you stir, the noodles will absorb the liquid, so sprinkle in 1-2 tablespoons of water as needed.
Continuing to stir with one hand, slowly drizzle in the beaten egg to form fine "ribbons of cooked egg. If you prefer, you make a thin egg "crepe" separately. Roll it up and slice it into thin noodle-like strips, which can be added to the pan at this point.
Quickly add the bean sprouts, cilantro and shrimp and cook very briefly, another 30 seconds.
Remove from the pan to a serving platter.
Sprinkle with remaining chopped peanuts and cilantro and garnish with lime segments.
* Just before serving, toss with cubes of tofu or thin slices of stir-fried chicken, pork or beef.
* Substitute shreds of Napa Cabbage or Bok Choy for the bean sprouts.