Boil the green beans in salted water for 4-5 minutes. Throw in a colander, and then put in ice water for a couple of minutes. Drain the water.
Heat the oil in a large skillet and fry the onions until golden brown, about 5 minutes. Then add the beans and simmer for about 4-5 minutes. Season vegetables with salt and pepper before serving.