Cook the spaghetti according to package instructions, rinse and set aside.
Let the butter melt in a skillet or large pan and add the ham slices . Bake them in the butter for a bit. Pour the cream in and leave this to thicken a bit. Take the pan of the heat and leave to cool slightly before adding the egg yolks.
If it is too hot, the eggs will start baking immediately so be aware of that.
Stir them well into the sauce and add the spaghetti.