Fill a deep skillet with water and boil Spaghetti in it by adding 2 tablespoons of salt. Also in this salted water, pour 1 tablespoon of oil.
Boil and cook until the Spaghetti is tenderized enough to be used in your recipe. After cooking drain it.
In the next step beat the eggs and add to it along with the Parmesan cheese and butter. Turn this mixture into a crust on a plate which should be already greased.
Over this crust sprinkle or make a layer of the shredded cheese. Also at this moment turn your oven on and preheat it to 350 degrees.
Take a large frying pan and heat oil in it. Start cooking the grounded beef in this heated oil. Also, add the onions to it at the same time.
Stir fry both of them and after frying for a few minutes, add pepper to the mixture and wait until the beef turns brown.
Once the beef has started turning brown add the tomatoes and tomato paste to the mixture. Pour some sugar, and sprinkle the oregano, salt, and pepper in it.
Once done cool a little and then spread a layer of this mixture over the crust above the layer of cottage cheese.
Bake in the oven which is already preheated for half an hour and make sure that it is uncovered.
Again spread mozzarella cheese over it and bake for some more time until the cheese melts and the Spaghetti pie is browned.