I don't get people who blames Stalin for reaching an agreement with Hitler. This is clearly viewpoint of the British side who had to face Germany before Soviets.
Stalin obtained the best agreement for the interests of Soviet Union. He saved Soviet Union from being the first victim of Fascism ( Let the capitalists fight each other ). The Allied hypocrites treated the Soviets like a third-rate power and but when things went wrong, they didn't hesistate to blame the Soviets. The Allies never considered anti-fascist alliance with Soviets seriously. On the other hand, Soviets prior to 1939 showed that they were quite willing to form an anti-fascist front with the Allies.
Besides that, Stalin extended Soviets to the further West with M-R Pact. This was important in terms of strategic situation. No one in the world predicted Germans taking over France within 6 weeks. So, Stalin cannot be blamed for this. His strategy was both the Allies and Germany bleeding each other and then Soviets overwhelming Germany from the East. He may be accused for not foreseeing German attack on June 22 but he certainly prepared Red Army for an eventual war with fascism. Soviet war machine Stalin created from 1930s onward showed that it was more productive than German counter-part.
Stalin was certainly a cruel man but IMO his long-term decisions showed that he was one of the most able leaders of his era.