There are probably no films (except documentaries) that directly engage with the Molotov-Ribbentrop Pact. However, its devastating effect on Poland, when the country was carved up between Nazi Germany and Stalin’s Soviet Union, can be starkly seen in Katyn (2007) by Polish director Andrzej Wajda.
As Polish refugees flee eastward from the Nazis they attempt to cross a bridge, only to meet refugees fleeing in the opposite direction from Russian troops. In the mayhem a reservist Polish officer is separated from his family. He joins his unit but is captured by the Nazis and handed over to the Russian army. In early 1940, he and other Polish prisoners, most of them army officers, are to taken to the Katyn forest, shot and buried in mass, unmarked graves. In total 22,000 were killed.