In a large heavy skillet heat margarine or butter over medium heat until melted. Cook and stir onion and sugar in margarine or butter about 10 minutes or until the onion is very tender and golden brown. Stir in vinegar. Cook and stir for 1 to 2 minutes more or until liquid evaporates. Stir in the roasted red peppers, olives, basil, salt, and black pepper. Remove skillet from heat; keep warm.
Meanwhile, in a medium saucepan cook the green beans, covered, in a small amount of boiling water about 10 minutes or until crisp-tender; drain. To serve, stir caramelized onion into green beans. Makes about five 3/4-cup servings.