Make the burnt chilli paste first. Heat the oil, add the onion and fry until softened. Remove using a slotted spoon and set aside. Add the chillies and fry until blackened, then remove and set aside. Add the garlic and fry until golden brown, then remove.
Grind half the fried chillies coarsely in a pestle and mortar. Add the onion and garlic and blend to a coarse paste. Return the mixture to the oil remaining in the wok and add the fish sauce, tamarind water and sugar. Heat gently for 2–3 minutes, stirring constantly, then remove from the heat.
Heat the oil in a wok over a high heat until the oil starts to shimmer. Fry the dried chillies until blackened, then remove using a slotted spoon and set aside. Add the sliced garlic to the wok and stir-fry until beginning to brown.
Add the chicken and fry quickly on all sides. Crumble the fried chillies over the chicken and add the burnt chilli paste, fish sauce, measurement water, sugar and one of the sliced chillies to the pan. Stir-fry over a high heat.
Add the basil leaves, kaffir lime leaves and cashew nuts and stir-fry for a further 1 minute. Garnish with the remaining sliced red chilli and the basil sprigs.