Heat olive oil in a large heavy saucepan over medium heat. Saute shallots and onion until softened. Move it to one side of the pan and add bacon to the other side of pan. Cook until bacon is browned. Stir shallots, onions and bacon together and add garlic to the mixture, cook for another couple of minutes. Remove from heat.
Cook pasta according to directions. Drain pasta and return to the pot.
In a medium bowl, whisk together egg yolks, cream and Parmigiano Reggiano.
Pour the bacon mixture over the pasta, then stir in the cream mixture. Season with salt and pepper, if needed.