Drain and rinse the cannellini beans, put in a saucepan and cover with cold water. Bring to the boil, then reduce the heat and simmer for 45–60 minutes until tender. Remove from the heat and set aside in their cooking water.
Heat the oil in a large saucepan over a low heat, add the garlic and leeks and cook, stirring occasionally, for 5–10 minutes until they are softened. Add the tomatoes with half the herbs, season with salt and pepper and cook for 12–15 minutes until the tomatoes have become pulpy.
Add the French beans, and the broad beans and peas, if using fresh ones. Cook for 1–2 minutes, then add the water or stock. Bring to the boil and boil rapidly for 10 minutes. Add the rice, the cooked beans and their cooking water and the spinach (and the broad beans and peas, if using frozen ones), and cook for 10 minutes. Adjust the seasoning and stir in the rest of the herbs.
Serve with a generous dollop of red pesto and a scattering of grated Parmesan, garnished with a few snipped chives.