A common reason for rotting and shriveling zucchini is lack of pollination by bees. Pollination is absolutely required for fruit set. Without pollination, the fruit that grows will yellow, shrivel, rot and die. Three solutions: Get some bees. Attract some bees (see "Butterfly and Bee Garden") or hand pollinate.
The zucchini has a male flower and a female flower, which must be pollinated in order for you to get proper fruit. To hand pollinate, break off a male flower, remove its petals to reveal the yellow pollen on its pistol, then roll the pollen onto the center stigma of the female flower.
You tell flowers apart because female flowers are larger and have a baby fruit behind their petals. The male flowers grow on a long stem and are smaller.
Some people use a cotton swab or artist's brushes to hand pollinate – a good idea.
If the bee crisis continues, everyone on earth needs to learn how to hand pollinate so please pass the word. I was remarking about the bee crisis to a famous gardener and mentioned that 1/3 of the human diet was derived from honeybee pollinated vegetables, fruits and nuts, and indirectly affected items. He wisely responded to me that if worse came to worse and all the honeybees died people could always hand pollinate their vegetable gardens to survive.
That does address the short term survival need with practical wisdom. However, most agricultural crops today are produced for the mass market by huge corporate farms. Honeybees are literally trucked in to accomplish pollination. Hand pollinating these large fields of crops does not seem feasible since it’s so tedious, and even if a way were found, it would still cause disruption in the food supply for an undetermined length of time. It would increase food prices exponentially too.