He kept Spain out of the Second World War because the country was decimated by the Civil War. He and the Axis powers repeatedly made overtures towards Spain joining on their side and throughout the period from the fall of France until US pressure in 1944 the regime was actively assisting the Axis. He only returned the nation to strict neutrality after the US imposed and oil embargo.
Western powers did a lot to try and improve Franco’s image after the Second World War. It was a bit embarrassing for them that they were championing the concept of liberal democratic freedom against the tyranny of authoritarianism while turning a blind eye to Franco’s Spain.