In a large skillet saute onions in margarine over medium heat until lightly browned, about 10 minutes. Add mushrooms and saute until mushrooms are browned, about 5 minutes. Remove from heat and set aside. Mix kasha with egg in a small bowl until kernals are coated. Place kasha in a large non-stick skillet. Cook over high heat, stirring and breaking kasha apart with a fork until egg is set and grains are separate, about 3 minutes. in a medium-size saucepan, bring stock to a boil. Add stock to kasha, cover skillet and simmer over low heat until liquid is absorbed, about 10 minutes. Remove from heat and set aside. Prepare pasta according to package directions and drain. Combine onion mixture, kasha and pasta. Season with salt and pepper and serve hot. Hint: This dish tastes even better made ahead and can be refrigerated for 3 to 4 days. To reheat, place in a casserole dish, cover and warm in a 180ÂșC oven or in a microwave oven.