Bring a pan of salted water to the boil, and cook the pasta according to the packet instructions.
Meanwhile heat a non-stick frying pan then add a drizzle of olive or vegetable oil. Gently fry off the onion until it starts to soften, then add the chopped bacon until it starts to colour. Up the heat a bit and toss in the mushrooms, stirring them so they fry and soak up the oniony, bacony oil.
Once the pasta has cooked, take out a little of the starchy, salty cooking water – a couple of tablespoons will do – then drain the pasta without being too fussy about it; a bit of cooking water still coating the pasta is ok.
If you used a colander, tip the pasta back into the pan, then add the fried bacon and onion mix. Stir in the pesto sauce, making sure all the pasta is coated, and adding a little of the reserved pasta water if you need to loosen the sauce a little.
Tip it into a large bowl, maybe sprinkle over some freshly grated Parmesan and a grinding of black pepper, and enjoy.