1Dice the onion and carrots small. Heat the olive oil in a large pot over medium heat and cook them for 6 minutes until soft.
2Add the minced garlic and cook for 1 minute, then stir in the crushed tomatoes and cook for 3 minutes.
3Pour in 1.2 litres of hot water with the stock cube and bring to a boil.
4Add the pasta and cook for about 8 minutes until just tender. Add the drained beans and simmer for 4 minutes, mashing some beans against the side of the pot to thicken the soup.
5Turn off the heat, stir in the pesto, and season with black pepper and salt. Serve with grated parmesan on top.