Quarter the aubergines lengthways, but don’t cut all the way through the stem – you want to keep them attached and intact. Dust the tofu with the cornflour.
Heat the oil in a wok, fry the aubergines in batches until tender, then drain on kitchen paper. Fry the tofu until golden and crisp, then drain on kitchen paper.
Fry the garlic until golden, then drain.
Finally, fry the shallots until they go dark golden brown, then drain well.
Pour off all but a tablespoon of the hot oil from the wok, then fry the sliced chilli and cashew nuts until the nuts turn golden brown. Add the palm sugar, fish sauce and tamarind pulp, and cook, stirring, until the mixture starts to bubble.
Return the aubergines and tofu to the pan and toss to coat. Scatter over the garlic and shallots, tear in the Thai basil and serve with lime wedges and sticky rice.
