In a large pot over medium heat pour in olive oil. Saute whole garlic cloves, onion, bacon and chilli flakes; cook until onion is translucent. Add tomato sauce, basil, oregano, salt and pepper; cook on low for 10 minutes.
Stir in stock cubes, cannellini beans and water; cook for 30 minutes. Remove the 7 whole garlic cloves, discard 3 and crush the remaining 4; return to pot. Add uncooked pasta and continue cooking until pasta is done. Mixture should be slightly soupy. Serve immediately.