Roast pine nuts in a pan without fat. Peel 1 onion and chop very finely. Heat 1 tablespoon of olive oil in a pan and fry the onions until transparent. Add pesto and mix in.
Deglaze with 125 g cream and 200 ml stock, bring to the boil, stir in 1-2 tablespoons of sauce thickener, bring to the boil again and season with salt and pepper. Keep sauce warm. For the ham and mushroom sauce, wash, clean and slice the mushrooms.
Cut the ham into strips. Melt the fat in a pot. Fry the mushrooms in it while turning and dust with flour. Deglaze with remaining cream and 225 ml broth and bring to the boil while stirring.
Season the sauce with salt and pepper. Add ham and keep sauce warm. Cook spaghetti in boiling salted water for about 8 minutes. Peel and crush garlic. Peel and roughly chop the remaining onions.
Heat 2 tablespoons of olive oil in a frying pan. Sauté the onions and garlic in it, add the remaining stock and tomatoes and simmer for about 3 minutes. Stir in tomato ketchup, season to taste with salt, pepper, paprika and sugar and stir in the remaining sauce thickener.
Bring to the boil again and keep the sauce warm as well. Dice the bacon and leave it out in a pan. Drain the spaghetti, quench, drizzle with the remaining olive oil and pour into the fondue pot.
Add sauces to taste with chopped parsley and basil leaves garnished in small bowls. Add roasted pine nuts, diced bacon and Parmesan cheese.