Heat the olive oil in a large skillet. Add the onions and garlic; saute until soft, about 3 minutes. Add the zucchini and saute, stirring, until golden and soft, another 8 to 10 minutes. Stir in the red pepper flakes if using. Season the zucchini with salt and pepper to taste. Sprinkle with parsley before serving.