In large skillet, melt butter over medium heat, add onions & saute until tender. Stir in shrimp and mushrooms. Cook 5 minutes stirring frequently; remove from skillet and set aside.
Heat and mix together mayonnaise, flour and salt in skillet. Gradually stir in milk and sherry. Bring to a boil stirring constantly for 1 minute. Add drained spaghetti and toss gently.
Place spaghetti and mushroom mixture in 1 1/2 quart casserole dish. Sprinkle cheese over top; cover and bake in 325 degree oven for 15 minutes or untill thoroughly heated, sprinkle lightly with paprika.