During World War II, European communists and socialists had a complex and often contentious relationship with their capitalist governments. While there were instances of collaboration against the common enemy of fascism, particularly in countries occupied by Nazi Germany, many communists viewed the capitalist governments with distrust and suspicion.
In general, the best description of this relationship would be that many communists and socialists opposed their capitalist governments and sought to undermine them, while simultaneously engaging in resistance efforts against the fascist regimes. In some cases, communist parties formed alliances with socialist factions and other anti-fascist groups, but there was also significant tension between the communist movements and the established capitalist governments, particularly as the war progressed and the political landscape began to shift towards post-war reconstruction.
Thus, during World War II, European communists often found themselves in a paradoxical position where they had to balance their ideological opposition to capitalism with the pragmatic need to resist fascism, which sometimes required temporary alliances with their capitalist governments.