Heat the oil in a saucepan and lightly brown the shallots for 2–3 minutes. Add the curry paste and peanuts and stir-fry for another 3–4 minutes or until fragrant.
Add the chicken or beef and stir-fry for 4–5 minutes. Add the coconut milk, stock, 2 tablespoons fish sauce and 40 g (1½ oz) sugar. Simmer for 10–15 minutes or until the meat starts to get tender.
Add the potato, onion, 2½ tablespoons tamarind purée and continue cooking for another 5–6 minutes or until the potatoes are tender. Adjust to taste, using the rest of the fish sauce, sugar and tamarind purée if necessary.
Spoon into serving bowls, garnished with shredded kaffir lime leaves and chopped chilli.