Preheat the oven to 200 degrees top / bottom heat.
For the sauce:
Chop the onion, press the garlic and sauté with a little olive oil. Then add the canned tomatoes and simmer gently for about 20 minutes. Pick in the basil and season everything with salt and pepper. Then add the parmesan.
Meanwhile, cook the pasta according to the instructions on the packet for about 8 minutes and then drain.
Grease a baking dish with olive oil. Then add part of the pasta and cover with part of the sauce. Cut the mozzarella into slices and pour about half of it over the casserole. Now pour the second half of the pasta over it, then the second half of the sauce. Finish the casserole with the rest of the mozzarella.
Put the casserole in the oven for about 20 minutes, until it has a golden brown crust.