Start by making a sofrito (frying off the aromatic ingredients to make the base of the soup). Slice the bacon, peel and finely chop the onions and garlic, then chop the carrots, celery and fennel. Pick the basil leaves, finely chopping the stalks.
Heat a lug of oil in a pan over a medium-low heat, stir in the chopped ingredients and sauté gently for 15 to 20 minutes, or until everything is soft but not coloured.
Halve and slice the courgettes lengthways. Core the cabbage or remove the tough stalky bits from the chard, then wash the leaves and finely slice.
Add the wine to the softened veggies and bring to the boil. Tip in the tomatoes, breaking them up with a spoon, then add the courgettes. Bring back to the boil, and simmer on a low heat for around 15 minutes.
Mix in the cabbage or chard, the beans and their juice and the stock. Bring to the boil, then add the pasta. Simmer over a medium heat until the pasta is cooked (use the packet instructions as a guide) – if the soup is too thick, add a little stock or water to loosen.
Season to taste, then rip in most of the basil leaves and dress with a few lugs of extra virgin olive oil. Stir well, and serve with the reserved basil and a fine grating of Parmesan.