Prepare the pesto. In a mortar crush the peeled and rinsed clove of garlic, the basil, a pinch of salt, the pecorino cheese and the grated parmesan.Crush until it reaches a smooth mixture, then dilute with water until covered. Cook the pasta in a large saucepan with plenty of boiling salted water.Drain it with a slotted spoon and arrange it on a dry tea towel. Add the pesto, 2 tbsp of the cooking water of the pasta and stir well.In the preheated serving dish put the melted butter, then a layer of pasta, spread it with pesto and grated parmesan.Repeat this process layer after layer until the ingredients are finished, then put the pasta under the grill for a few minutes. When ready serve in heated dishes.