Wash the asparagus, cut off the woody ends. Halve the asparagus lengthwise and cut into pieces. Roast pine nuts in a pan without fat. Cook pasta in boiling salted water according to package instructions.
Peel and finely dice the shallot. Heat the fat in a saucepan. Sauté the shallot in it. Dust with flour, sweat on, deglaze with stock while stirring and bring to the boil. Coarsely grate the pecorino. Stir the ricotta and half of the pecorino into the sauce.
Season to taste with salt and pepper. Heat the oil in a frying pan. Fry the asparagus for 3-4 minutes. Pour the pasta onto a sieve and drain. Mix noodles and asparagus and arrange on plates with the sauce.
Sprinkle with pine nuts and the rest of the pecorino.