What Stalin did?
In years 1936-37, after the reconstruction of the economy of the country and the Soviet countryside, Stalin was finally able to deal with the army and the expansion of his sphere of influence. With this in mind, he made a typically imperialist decision to direct his expansion east of the USSR, which soon became his main target. To achieve it, he began intensive arming and training of the army, waiting for the moment, when his strength will be sufficient, to be able to seize the lands beyond the eastern border of his country – the lands of the Republic of Poland.
However, that Stalin's imperialist plans could be realized, he had to find a suitable ally beforehand. An ally, which would discourage opponents of the Soviet Union, threatening them with his strength, arousing fear and thus discouraging them from conflict with the USSR. He should also support Stalin, by providing the Union with the necessary military and political assistance. Ally, whom Stalin was looking for should be a strong and powerful state.
After this qualifying, three candidates were eligible, who would be fit to be Stalin's ally: Third Reich, France, Anglia. The last two dropped out for obvious reasons. Adolf Hitler remained.
Stalin, having found the state, that could serve him as an ally, to be able to achieve the intended goal, which was the expansion west of the USSR, he chose the tactic of gradually encouraging Hitler to joint aggression against Poland.
Negotiations were slow at the beginning. For approx. 3 for years, almost nothing had been done about the approach of the Third Reich and the USSR. Stalin blaming it (and more for that) Maxim Litvinov, the then-commissioner of foreign affairs, whose name was associated with the conflict between the two countries (Litvinov supported the West and was a Jew), in May 1939 a year removed him from office, which was then taken by Vyacheslav Molotov. Events have clearly picked up on pace since then. However, request, which he received a newly appointed, the whole thing was not easy. First, The Germans did not want to share the spoils at all, what the Polish lands were, wanting to attack the Republic of Poland alone and keep it entirely for himself. Second, finally, the former foreign commissioner made virtually no progress in improving relations between the Reich and the USSR, which remained cool all the time. In such a situation, it was not possible to start negotiations by proposing an alliance directly. However, it was necessary to hurry, because Hitler's attack on Poland was only a matter of a few months and if the Soviet Union did not enter into an alliance with the Third Reich on time, a tasty morsel, what the Polish lands were, could be irretrievably swallowed by Hitler.
Molotov taking advantage of the fact, that Germany needed raw materials, whose enormous resources belonged to the Soviet Union, Initially, it made efforts to sign a trade treaty by two countries. However, this did not induce the Reich to take any sensible actions. Despite the conversation between the commissioner and the German ambassador, Friedrichem Wernerem from the Schulenburgiem, taking place 20 May 1939 year, during which he lamented, that the German government is not taking any action to sign a trade agreement, which could later serve as an aid to lay a new basis for relations between the two countries, Hitler showed no intention of signing such a document.
In connection with the above course of events, Stalin decided to force the coveted alliance on the leaders of the Third Reich by blackmailing the possibility of the USSR signing an agreement not with Germany, but with England and France (which, in fact, was not Stalin's desire, but only his double play).
For this purpose of the day 15 June 1939 In the year, a Bulgarian MP Parkan Draganov was sent to Berlin, presenting himself as an intermediary of the Soviet charge d'affaires, Georgija Astachowa. He met with the Undersecretary of State at the Berlin Ministry of Foreign Affairs, Ernest Woermann and declared to him, that “The Soviet union (…) he hesitated in choosing between three possibilities, namely: concluding a pact with England and France, continuing the negotiations on pacts and rapprochement with Germany. Last possibility (…) it is closest to the wishes of the Soviet Union. (…) Had Germany stated, that they would not attack the Soviet Union, or that they would have entered into a non-aggression pact with him, The Soviet Union would probably refrain from concluding an agreement with England”.
It had the expected effect. 28 June 1939 Schulenburg took the first steps towards the rapprochement of the two countries and declared to Molotov, that signed 24 April 1926 treatise of Fr. “friendship and neutrality” despite subsequent complications between the two countries, it did not expire and could be the basis for signing the aforementioned non-aggression pact.