Melt the butter in a large skillet over medium-low heat and then add the shallots.
Cook the shallots, stirring frequently, until soft and translucent, about 4 minutes. Add the garlic and cook, stirring constantly, for 1 minute more. Do not brown.
Add the heavy cream, salt, pepper, and nutmeg. Bring to a gentle boil.
Cook, uncovered, stirring occasionally, until the cream is thick enough to coat a wooden spoon, about 10 minutes.
Add the cheese. Stir until melted.
Add the spinach to the sauce. Stir until evenly combined with the cream sauce.
Taste and adjust seasoning if necessary. (If the spinach seems a little watery, cook over medium-low heat until any excess liquid evaporates.) Serve warm.