Cut the broccoli into small florets, wash and cook in salted water until firm to the bite. Rinse with cold water and finely chop about 1/4 of the cooked amount.
Put the spaghetti in the boiling water and cook until al dente.
Meanwhile, cut the onion into fine cubes and sauté in oil until translucent. Add the chopped broccoli and sauté briefly. Add the crème fraîche, the vegetable stock and the ground pistachios and bring to the boil. If the cream is not homogeneous enough for you, you can puree everything again with the hand blender if you like.
Finally, season the cream with salt (be careful if you used salted pistachios!), Pepper and lemon juice. Then mix in the capers as desired.