...which included an (at the time) secret protocol which divided Poland into German and Soviet 'spheres of influence' [1], and the Soviet Union promptly invaded Poland two weeks after Germany did (on the 17th September 1939) annexing the Eastern territories of Poland.
In Europe at least, the start of WW2 is usually placed at the 1st of September 1939, when Germany invaded Poland (this was also taught in East German schools btw, so it's not a 'Western" point of view - the secret protocol of the Molotov-Ribbentrop-Pact was conveniently left out of course).
Germany and the Soviet Union also had pretty close economic ties right up until the German invasion of the Soviet Union in 1941 [2].
[1] https://en.wikipedia.org/wiki/Soviet_invasion_of_Poland
[2] https://en.wikipedia.org/wiki/German%E2%80%93Soviet_Commerci...