Cook the pasta in salted water until aldente.
Peel the onion and garlic, dice them finely and sauté in the oil until translucent, add the ham cubes and fry them, now add the spinach and slowly defrost over a moderate heat, add the gorgonzola, let it melt, and season with salt, pepper and a pinch of nutmeg to taste.
Toast the pine nuts in a pan, stirring constantly.
Drain the pasta in a sieve, arrange on pasta plates, pour the spinach-gorgonzola sauce over it, sprinkle with the pine nuts and serve.