In a saucepan, heat oil, then add the garlic and onions. Cook onions and garlic until fragrant and slightly brown.
Add green beans and cook for about 2 minutes until almost tender. If the pan is too dry, add about one to two tablespoons water. Then add five-spice powder, and stir well into green beans. Cook for about another minute or until green beans are tender.