I cooked the egg in a separate pan because I didn't want the beans to dry out. I cooked it at the same time I added the spinach. You can cook the egg in the same pan simply by making an egg sized space in the pan and placing the egg in the space. Either should work just fine but you may want to add the egg before the beans.