Heat olive oil in a large frying pan over medium-high heat. Add onion and garlic, and cook, stirring until translucent. Add courgette and chilli, and sauté until soft. Stir in corn and beans, and heat through. Season with salt to taste.
If you can't find tinned black beans, use dried or tinned kidney beans.