Not really, Stalin wanted to attack them long before Hitler
The Molotov-Ribbentrop Pact was a strategic move by the Soviet Union to buy time before World War II, especially after Western powers opted for appeasement instead of forming an alliance against Nazi Germany. If you're interested, here are some sources that delve deeper into this topic: