Much of this is a rehashing of a previous answer I did, which dealt more with the Cold War. I'd encourage you to check it out, but I'll write up the answer here too.
For World War II, Spain had just finished up with an absolutely devastating Civil War, and was probably in no place to join in World War II, even if they were so inclined. Which, frankly, Franco was not. Although Franco is simplified to being a fascist, it was much more complicated than that. Properly speaking, while he certainly had leanings in that direction, he was the head of the Nationalist faction in the Civil War, which included the very fascist Falange, but many other elements such as monarchists and capitalists, all united by their anti-Communism. As for Franco himself, some might say he defies a specific one-word label (I'll let /u/Domini_canes talk about that), but anti-Communist is certainly a central part of his identity.
That was a key part of the Civil War, with the Nationalist groups fearing the Spanish government had gone to far left. The Soviet Union had been - aside from Mexico - the only significant power to openly support and supply the Republican Forces during the Spanish Civil War. On the flip side Germany and Italy had supplied the Nationalist Forces. Communists were very much the enemy. And the Axis powers had provided invaluable assistance that quite possibly was the key to Nationalist victory.
So while indebted to Germany and Italy, and also agreeing with their war against Bolshevism, Franco really had no major bones to pick with the Western Allies, at least to the point of desiring war. Supposedly Franco did briefly make overtures when France fell, contingent on German forgiveness of the monetary debt incurred from the Civil War. Germany didn't want to make that nice a deal though, so passed. Of course later, Germany extended the offer back, by which point Spain wanted no part in it. And thats the sum of it. While sympathizing with certain Axis aims, Franco was a smart guy, and was looking out for Spanish interests, and entanglement in the war was not that. So while Spain traded with the Axis powers, he wasn't going to risk what he had won in the Civil War by joining a fight which he would get very little out of. And of course, even if Franco was more gung-ho, Spain was rebuilding from the Civil War, and could hardly afford another war that threatened to be even more devastating.
What he did do allow for the raising of a volunteer force, which only was to fight on the Eastern Front, as it was portrayed as part of the crusade against Communism specifically, not a broader endorsement of the Axis' war aims against the Allies. Known as the Blue Division (Division Azul), the fought as part of the Heer from the very early stages of Barbarossa until late-1943, when they were recalled. It numbered about 20,000 men at its peak, and was generally very well respected by the Germans. (Also, not as heralded, but some soldiers from the Republic who fled when they lost ended up serving in the Allies armies, but they didn't have a cool name. Many went in to the French Foreign Legion).
As I said though, Franco was doing his best not to offend the Western Allies, and they pressured him to recall the division. Internal pressure began to mount too, as the fight against the Communists wasn't going as well as hoped. The Blue Division was recalled in late-43, but many wanted to continue fighting (I believe this was mostly the Falangists, who, again, were the most in step with the German views), and were mostly integrated into the SS, as a foreign raised company, although others were distributed around the Heer. Some returned later, while others stuck around to the bitter end.
In the post-war era, service in the Blue Division was still seen as a very positive thing. Although the government didn't explicitly endorse it - wanting to not remind the West of the episode perhaps - veterans groups held reunions and openly would assemble wearing their uniforms and decorations, and there are plenty of memorials to the fallen in Spain.. The veterans remained proud of their efforts to fight against communism, as anti-communist sentiment was still a very strong part of Francoist Spain.
After the war, Spain was shunned for a time due to their participation with Germany, kept out of the UN by the insistence of the USSR, but the Cold War shifted priorities, and the US saw a potential anti-Communist ally, so by the mid-1950s, Spain had been essentially rehabilitated in the international community. For more on that, I'd direct you to the post I mentioned at the start about the Cold War.
A great source, and where most of my reading on the topic comes from, is Blue Division Soldier 1941-45, by Carlos Caballero Jurado
is there any evidence of (axis) planning for an allied invasion through spain?
I mean, they hinged quite a lot on the assumption that the allies would observe spain's neutrality.