I would say that the ending of World War I helped set the stage for World War II starting. The Treaty of Versailles was one where Germany felt humiliated and punished by the terms imposed by England and France. These conditions such as the lack of an army, the forced payment of reparations, as well as border redefinitions helped to create a level of resentment and anger within Germany. This brooding and sentiment was tapped perfectly into by Hitler and the Nazis, who used the Treaty as part of their "politics of blame" and allowed the Germany body politic to unify around Hitler and his message, leading to the outbreak of World War II.
A lot of historians refer to the two world wars as one world war. In other words, they say it was all one war with a 20 year peace in between. So, that means that WWI had a great deal to do with WWII.
After WWI, Germany was treated very badly by the Allied Powers in the Treaty of Versailles. They had land taken away from them and were forced to pay reparations to other countries, among other things.
This made Germans very angry. They felt they were being unfairly picked on. This helped Hitler come to power because he promised to make them strong again so they could avenge the insults from the Treaty.
So Germany started WWII largely out of anger about the treaty that ended WWI.
World War I, or to be more specific the unequal Treaty of Versailles forced upon Germany at the end of World War I, was the major cause of discontent among the Germans, which enabled Hitler to rise to tower in Germany, and get support of people for the efforts required for preparing for the World War II. It is quite likely that if the treaty after the World War I was more just, there would have been greater chances of developing better relations between the warring nations of the World War I, and securing more lasting peace.