Fill a large pot with water and bring it to a boil. Add a pinch of salt to the water; this enhances the flavor of the gnocchi. Carefully drop the gnocchi into the boiling water. Gnocchi will naturally sink to the bottom of the pot but will rise to the surface as they cook. When they float to the top, it's usually an indicator that they're ready. This process typically takes around 2-3minutes. Use a slotted spoon or strainer to scoop the cooked gnocchi out of the water.
Heat the olive oil in a large skillet over medium-high heat. Add the chopped shallots and sauté them until they become translucent.
Incorporate the sliced mushrooms and cook them until they release their moisture, and it evaporate.
Stir in the butter and minced garlic, cooking until the butter is completely melted and, the garlic becomes fragrant.
Pour in the heavy cream and season it with salt and black pepper. Let it simmer for about 4 minutes.
Add the al dente rigatoni and the grated Parmesan cheese into the skillet. Toss everything together, adding the reserved pasta water gradually to reach the desired creamy sauce consistency.
Continue cooking for an additional 3 minutes, ensuring that the pasta is thoroughly coated and heated through.
Serve hot, garnished with freshly chopped parsley, and top it with shavings or slices of Parmesan cheese. Enjoy your meal!