Defrost shrimps at room temperature. Peel them, remove the heads. Boil the spaghetti to the state of al-dente, remove to a colander and drain. Heat some olive oil in a frying pan and fry the chopped garlic on the medium-low heat for a minute or two, but preventing browning. Add peas (without defrosting), cook for a few minutes, turn the heat off. Combine spaghetti, peas and shrimps.
Stir in mascarpone cheese. Add eggs one by one, stirring intensely. Season with salt and ground pepper.
Grease the baking pan with olive oil, put in the spaghetti and slightly press it with cooking spatula, bake in the pre-heated oven at 170-180 °C for nearly 20-25 minutes.
Cool a cake for 20-30 minutes before serving.