1Boil the pasta in salted water until almost al dente. Reserve some pasta water before draining.
2Heat some olive oil in a pan on medium-low heat and fry the onions until softened and golden. Season with salt and pepper.
3Add the bacon and cook with the onions until everything is golden and the bacon is crispy.
4Return the drained pasta to the pot then add the onion and bacon mixture, cream and a generous splash of pasta water. Stir constantly.
5Remove 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.