Stalin made that pact - only AFTER - 'the west' had turned down his proposal of a security pact, with them. He had no illusions about Hitler or Germany - but knew that he needed TIME, to prepare for a fight with them. He moved the Soviet Manufacturing to East of the Urals, for instance - and began building an Army, to defend the USSR, with. As a result - his non-aggression pact held-up, until the Nazis attacked. In the meantime Chamberlain was making concessions with the borderlands of Czhekoslovakia.
And this is NO KIND of parallel to Stepan Bandera and that bunch - who actively donned Waffen SS uniforms with Totenkopfs and Swastikas - then helped murder not just a bunch of Jews - but Poles, Romany - and almost 27 Million Russians/Soviet citizens.