You can bring a large amount of salted water to a boil (for the pasta).
Dry the scallops with a high quality kitchen paper, and season them with some salt & pepper.
Then, clean the mushrooms and cut them in small strips, like lardons. And feel free to crush to clove of garlic. That's it: preps done!
Cooking
When the water is cooking, you can add the pasta. Cook the spaghetti al-dente, which should take about 8 minutes. Important is not to overcook the pasta.
Melt the butter in the baking pan and add the mushroom strips & crushed clove of garlic. Once the butter is starting to turn golden, you can add the scallops. Bake these on a medium-high heat for about 3 minutes per side. They cook very fast so keep a close eye on them. When almost finished, you can add the white wine.
*Pasta not done yet? Keep the scallops warm in a deep dish covered with some tinfoil. In this way you make sure that the scallops are not baked too well done.
Transfer the drained cooked pasta to the baking pan. Then add the samphire, black pepper and half a soup spoon of the cooking liquid. Bake this shortly to make sure everything is hot.