Mince the onion and the garlic. Rinse and drain the beans.
Heat the olive oil in a large skillet over medium heat. Add the onion and garlic and sauté until tender, about 5 minutes.
Add the beans, chili powder, oregano, corn, and green chilies; sauté for a couple of minutes just to heat them through. Add the spaghetti sauce and season to taste with salt a