Cook the pasta until al dente according to the instructions on the packet. Cut the mushrooms into slices and the onion into cubes.
Heat the oil in a deep pan and fry the onions and mushrooms in it. Season with pepper, salt and the garlic paste, then deglaze with vegetable stock. Stir in the milk and cream and melt the finely chopped Gorgonzola in the sauce while stirring. Bring the Gorgonzola sauce to the boil briefly, then switch off the stove and use the residual heat. Season the sauce to taste.
Put the pasta in the sauce and mix well. Cut the cooked ham into strips and heat them up in the Gorgonzola sauce.