Heat the oven to 350°F/175°C and butter the baking dish. Cook the pasta in boiling salted water until barely al dente. Transfer the cooked pasta to a bowl of cold water to stop it cooking, then drain on a kitchen towel.
To make the filling: sauté the cooked spinach in the butter. Allow to cool slightly then mix with the ricotta, nutmeg and salt an