In a bowl, combine tamarind pulp and 1/3 cup hot water. Let cool, rub pulp off seeds, and press mixture through a fine strainer into another small bowl; discard seeds.
In a 5- to 6-quart pan over medium heat, stir shallots with oil until golden and crisp, 3 to 6 minutes. Lift out with a slotted spoon and drain on towels.
Add garlic and chili paste to pan and stir until garlic is fragrant, about 10 seconds. Add broth, cover, and bring to a boil over high heat.
Add shrimp, pineapple, fish sauce, sugar, lime juice, and reserved tamarind pulp. Cook, uncovered, just until shrimp turns pink, 2 to 3 minutes.
With a slotted spoon, transfer shrimp and pineapple to wide soup bowls. Stir tomatoes, bean sprouts, basil, and rice-paddy herb into hot broth.
Ladle soup mixture into bowls and sprinkle with fried shallots. Add chopped chilies to taste.