Boil onions in lightly salted water until tender; drain.
Melt 2 tablespoons margarine; stir in flour.
Add milk gradually; cook, stirring constantly, until thickened.
Layer onions, white sauce and peanuts in casserole; season to taste.
Mix crumbs with remaining margarine; sprinkle over onion mixture.
Sprinkle with paprika.
Bake at 325 degrees for 25 minutes or until heated through.