Boil the pasta in salted water until almost al dente. Reserve some pasta water before draining.
Heat some olive oil in a pan on medium-low heat and fry the onions for 5-7 mins, until softened and golden. Season with salt and pepper.
Add the bacon and cook with the onions for another 3-4 minutes, until everything is golden and the bacon is crispy.
Return the drained pasta to the pot then add the onion and bacon mixture, cream and a generous splash of pasta water. Stir constantly.
Remove from the heat, then stir in the egg and grate in plenty of parmesan. Constantly stir the pasta to create a silky sauce, add more cream or pasta water if necessary. Taste to adjust seasoning.
Serve and enjoy.
