Stalin was an ally because "the enemy of my enemy is my friend" right?
Well was hitler also in that same boat? The West hated communism and considered them to be a looming enemy. With someone who was also as vehemently anti-communist as Hitler, why not ally with him against the USSR?
This is actually pretty close to the original vision the west had towards Nazi Germany and the Soviet Union, whereas Nazi Germany would act as a buffer against Communism to the east.
The problem is that the Nazis were awfully unreliable as partners in anything, and Hitler broke every agreement he ever made, most notably the Munich pact. By 1939 after the annexation of rump Czechoslovakia it was pretty clear that there was no end to his territorial ambitions. The decision to declare war over Poland was motivated by the fact it was obvious there was no stopping Nazi Germany except for war.
The USSR on the other hand, prove to be quite reliable partners, for all the bluster of revolutionary socialism the Soviet leadership were pretty good at keeping their deals (too good in fact). And ever since the ascension of Stalin's "Socialism in one country" was not overtly interested in starting a general European war aimed at dominating the continent.
In other words it sort comes down to despite the fact that the west would like to have allied with fascism as oppose to Communism, the Fascists terms for such an alliance (domination over Europe by Germany) was unacceptable to the west.
I think you should qualify the statement "the West knew Stalin planned to invade the rest of Europe". As of 1939, German had annexed Austria, Czechoslovakia and was making territorial demands to Poland. The USSR didn't invade anyone yet.
Secondly, Germany was a much bigger and immediate threat. It was located much closer to France and Britain geographically. It was impossible for the USSR to invade western Europe without first going through Poland and the Germany.
Your question really presupposes a lot of things that are really just fundamentally incorrect.
"The West" whatever that precisely is, did not have a unified view on 1) Hiter, 2) the USSR, and 3) any coming war.
Tl;dr: the USSR wasn't going to invade Europe. France and the U.K. wanted to ally with the Soviet Union because they recognized the threat that Germany posed, but domestic consideration for the British kept them dicking around so much that the Soviets suspected they were being duplicitous and eventually signed the Molotov-Ribbentrop Pact. See Stalin's famous "chestnuts out of the fire" speech of March 10, 1939, clearly aimed at the U.K. and France. ("To be cautious and not allow our country to be drawn into conflicts by warmongers who are accustomed to have others pull the chestnuts out of the fire for them.").
Some of these are a lot easier to figure out than others:
France
France hated Germany. Come 1939, France had fought two major wars in the past 60 years, the Franco-Prussian War, and then World War Two. In the inter-war period, the Third Republic built the Maginot Line, and for more than a century, France and Prussia and traded Alsace-Lorraine between them. Inasmuch as France was part of the "West," they were worried about Germany, not the Soviet Union.
U.K.
Things were a bit more complicated in the U.K., but not much more. Yes, Churchill and some of the old Tories railed against Hitler, but there was a vibrant Communist Party in the U.K. in the inter-war period, and the Labour Party was as socialist as it would ever would be back then. It viewed the USSR much more sanguinely than Germany.
Who else is in the "West" in your question? I'm really not sure. Surely not the United States, which was still mostly isolationist in the '30's. Spain was under Franco. Belgium and the Netherlands were negligible. Poland was a joke, and the U.K. knew that Germany would be invading.
U.S.S.R.
The Soviet Union knew a war with Germany was coming, and attempted to negotiate a Tripartite Pact with France and the U.S. in the spring and summer of 1939. The French government was essentially good to go, but the U.K. dawdled.
Below is a lightly edited writing I've done before about the negotiations.
By April, the French appeared to have realized that the game was up. Reports that the Soviet Ambassador to France, Surits, was constantly approached by French Foreign Minister Bonnets on the matter of joint opposition to Germany seemed to convince the Soviets that the French had come around. However, ultimately, French policy followed British policy, and although the French pressured the British to pursue an alliance with the Soviet Union, France was ultimately a consultative presence rather than an influential one. On April 17, as the result of British attempts to call Litvinov’s bluff about giving a counter-proposal to British and French proposals, was that Litvinov gave the British Ambassador the text of a counter-proposal, much to the surprise of the British. The proposal stated three things: that the French, British and the USSR would intervene to protect all countries bordering the USSR and each other, to immediately draw up military scenarios and to not establish a separate peace. The French reacted very favorably, while the British reacted quite unfavorably to the proposal. The Cabinet minutes Carley recounts reveal British bad faith — when a Foreign Ministry official commented that anything less than an assurance to the Soviets that they would not be left alone should Germany attack would appease them, and that anything less would play into Soviet mistrust and cynicism. His opinion was clearly ignored. The British told Moscow that they had been “too busy” to consider Litvinov’s proposals after several weeks. By this time, it was May, and the Soviets clearly had reason to mistrust the British.
[editing a bunch here, taking out some of my commentary. The next paragraph deals with how Soviet suspicion led to the alliance with Germany]
With Litvinov’s dismissal in May, Soviet patience had run out. Litvinov had been the symbol of collective security, and his negotiations had thus far, failed. Molotov was still committed to pursuing them, however, it is very difficult, in light of Molotov’s continued negotiations, to attribute this change as a sign of rapprochement with Germany, because of Litvinov’s Jewish ties. In the meantime, there had been very few Soviet and German negotiations. During May 14 cabinet meetings in Britain, every cabinet member expressed anti-Soviet opinions, notwithstanding possibilities of further negotiations. At the end of May, a British-French proposal included using the League of Nations to effect a military alliance in the event of a German attack, but the use of such a mechanism was absolutely against Soviet aims, as the British must have known. By early June, negotiations on specific terms had begun, and the Soviets pressed for guarantees against aggression against the Baltic states.
It is within this context that Soviet contacts with Germany must be examined. With the subsequent travel by “boat” of the military envoys from Britain and France in August 1939, and after having pulled teeth for an agreement, which really gave the USSR nothing more than the chance to replicate the conditions of the first World War, the Soviets were incredibly suspicious of British and French sincerity. Ultimately, it is clear that Soviet misgivings about the Alliance with Britain and France, led to alliance explorations with Germany. Furthermore, it is clear that there were those within the British and French military and diplomatic establishments who knew that the British and French would proposals would antagonize the Soviets and possibly leave them isolated and closer to Germany.
Sources:
#Nazi-Soviet Relations: 1939-41. Ed. by Sontag, Raymond James & James Stuart Beddie. New York: Didier, 1948.
#Carley, Michael Jabara. 1939. Chicago: Ivan R. Dee, 1999.
#Leonhard, Wolfgang. Betrayal: The Hiter-Stalin Pact of 1939. Trans. Richard D. Bosley. New York: St. Martin’s Press, 1989.
#Roberts, Geoffrey. The Soviet Union and the Origins of the Second World War. New York: St. Martin’s Press, 1995.
#Roberts, Geoffrey. The Unholy Alliance. Indianapolis: Indiana University Press, 1989.
#Weinberg, Gerhard. Germany and the Soviet Union: 1939-1941. Netherlands: E. J. Brill, Leiden, 1954.
You may want to have a look at this thread.
Please be aware that the West also included the Nordic countries, the Lowlands and France, all attacked by Nazi Germany and some for the second time in 22 years. To side with Nazi Germany would mean leaving the few democracies left in Europe to their own device. The UK and the US would be the only bigger nations with democratic systems.
There were those who think this would have been a better idea. Hell, Churchill wanted to re-arm the German army and continue the war after Germany surrendered (thoughthe codename for the possibility was called Operation Unthinkable...)
There were plenty of democratic countries that sided or sympathized with the Nazis. Sweden and Finland for example. For Finland it was partly self-preservation, but there was an ideological element to it.
Ultimately, the reason was partly Germany's recent actions in Central Europe, the Spanish Civil war and the shadow of WWI.
But I also kinda question the premise of "Stalin planned to invade the rest of Europe". Stalin was actually kinda isolationistatthe time, and the official policy of the USSR had shifted from promoting World Revolution to seeking Socialism in One Country.