In food processor, blend the shallots, garlic, ginger, pepper, tamarind liquid and turmeric to form a paste. Let shrimp marinate in lemon juice and salt for 15 minutes and then toss with the paste. Heat oil in skillet and stir fry shrimp mixture, chiles and pepper flakes for 1 minute. Add coconut milk, potatoes and tomato. Bring to a boil over moderate heat and cook for 15 minutes or until potatoes are soft. Serve warm with rice.