Add the butter, onions and a pinch of salt to a medium saucepan. Cover with a lid and cook over a medium low heat, stirring often, for 10 minutes or until the onions are softened and fragrant.
Remove the lid and cook for another 8-10 minutes, still stirring, so that the onions colour but don’t burn.
Meanwhile, bring a large pan of well salted water to a boil then add the pasta and cook according to packet instructions, then drain, reserving a couple of tablespoons of the cooking water.
When the onions are ready add the sauerkraut and cook for a further 2-3 minutes to heat through. Turn off the heat and add the cooked pasta and the soured cream. Mix well and check the seasoning, adding plenty of black pepper and loosening if needed with some of the reserved water.
Serve immediately sprinkled with the chopped parsley or dill.