Heat the oil in a wok and fry the shallots and garlic until golden brown; remove from oil and drain. Add the dried shrimp and dried chilies; fry until golden brown; remove from oil and drain. In a mortar or blender, grind the shrimp, garlic, chilies, shallots and sugar until the mixture is blended well. Add the fish sauce, tamarind juice, salt and cooled oil from the wok into the blender; blend until you have a finely textured sauce. This can be stored in a glass jar in the refrigerator for about 3-4 months. Recipe from: The Elegant Taste of Thailand, by Sisamon Kongpan & Pinyo Srisawat.