Place the clams in a large bowl, cover with cool water and soak for 1 hour, the helps the clams to realease the sands inside.
Soak tamarind pulp with warm water for about 30 minutes, then push through a sieve and discard solids.
Bring 1 litre of water to a boil in a pot over medium high heat, add clams. When the shells are open, remove clams from the pot, pour them into a sieve and remove the shell. Drain and rinse clams and set aside. Keep the boiled clams liquid.
Heat vegetable oil in a large saucepan, add shallot and fry well until golden, add tomatoes and continue to stir-fry until tender. Then add the boiled clams liquid. Add pineapple, tamarind liquid and bring to a boil for about 10 minutes. Add fish sauce, salt and sugar to taste.
About 5 minutes before finished, add clams (removed the shell).