Fill a kettle and boil it. Pop the rice in a pan. Pour in 300ml hot water from the kettle. Cover. Bring to the boil. Turn the heat right down. Simmer for 20-25 mins till all the water has been absorbed.
Take the rice off the heat. Leave it to steam, lid on, for 5 more mins to finish cooking the rice. The rice will stay warm in the pan with the lid on.
Peel and slice the shallots. Halve and peel the squash. Scoop out the seeds. Chop into bite-size chunks. Halve the pepper. Scoop out the seeds and white bits. Roughly chop it. Finley slice the chilli – flick out the seeds for a milder curry, or leave the chilli out entirely.
Drain and pat dry the tofu. Chop it into cubes. Heat 1 tbsp olive oil in a deep frying pan or wok. Add the tofu. Stir-fry for 5 mins till it’s golden all over. Lift out of the pan. Pop on a plate.
Add the shallots and chilli (if you're using it) to the pan. Stir-fry over a low heat for 3-4 mins till they start to soften and look glossy. Stir in the squash and peppers.
Stir in the curry paste and lime leaves. Fry for 1 min, then add the coconut milk, the vegetable stock cube, the juice of half the lime and 200ml hot water. Pop on a lid.
Bring the curry to the boil. Cover. Turn the heat down. Simmer for 10-15 mins till the squash is tender. Stir the tofu back into the pan. Taste and season with salt if you think it needs it.
Simmer for another 2-3 mins without the lid on to warm everything through. Serve with the rice and the other half of the lime for squeezing.