Cook the spaghetti al dente according to the instructions on the packet.
In the meantime, cut the mushrooms into thin slices and the wild garlic into narrow strips.
Heat the butter and sweat the chopped shallot in it. Add the mushrooms, season with salt and stir-fry for about 4 minutes. Mix the spaghetti, wild garlic and parmesan with the mushrooms. Season to taste with salt and pepper.