Heat the oil in a large, heavy-based saucepan over a medium-low heat, then add the onion, celery, carrot, red pepper and garlic and cook gently for 12–15 minutes or until softened. Add the tomato purée and wine and cook for a further 2–3 minutes.
Stir in the stock, beans, thyme, rosemary and bay leaves and season with salt and pepper. Bring to the boil, then reduce the heat and simmer gently for 20 minutes.
Stir in the pasta shapes and continue to simmer for about 12 minutes or until the pasta is al dente.
Ladle into bowls and serve with a drizzle of olive oil and sprinkled with the Parmesan, if liked.