This is a traditional Thai dish that can be interpreted in a humorous way, as male testicles in Thai are also referred to as eggs.
Hard-boil the eggs and let sit in cold water, then peel and set aside. Put vegetable oil in wok and add the eggs and fry until the eggs turn golden brown around the outer surface. Remove the eggs from oil. In the same oil, saute shallots until brown and then set aside. Then put palm sugar in the same oil together with the tamarind mixture and fish sauce. Let it simmer and stir constantly until it thickens. Taste should be sour, salty and sweet. Turn off the burner.
Cut the eggs in half and place face-up on on a dish. Spread shallots over the eggs. Pour liquid mixture over the eggs and garnish with cilantro and serve the chiles in a separate dish.