WWII began in 1939. The Spanish Civil War had ended in 1939. Entering into a new war right after finishing another one is a hard sell even to the most ardent war hawks. Spain remained neutral not because of any difference in ideology, but because of how badly the Spanish Civil War had left the country in dire economic straits.
Franco has been described as having Fascist tendencies, but he is a more complicated figure than that. His Nationalist movement did certainly contain fascist elements with the Falange, but it also contained elements such as monarchists, capitalists, anti-communists and, pro Catholic Church, with a central theme of anti-communism which they felt they had just eliminated from Spain by beating the Republicans. They did this in part with direct lethal aid and outright intervention by German, and Italian forces (e.g. Guernica) He was essentially a conservative pragmatist. The Republicans had the support of the Soviet Union and with some aid and diplomatic protections from the sympathetic leftist government of Lazaro Cardenas the President of Mexico. The intervention from the Axis most likely held the key to dispatching the Republican forces and in Franco's eyes, the communists from the Spanish state.
However, even though Franco agreed with certain aims of the Axis cause and definitely agreed with the anti-communist goals, there was no skin in the game for him to take issue with any of the Ally countries at the outset of the war. And even if he did, Spain was certainly in no position to posture itself due to its economic devastation Franco was trying to alleviate
The allies, mainly through Britain, tried to incentivize Spain into staying neutral by instituting economic blockades which reduced free trade between Spain and the Axis powers by limiting the quantity and type of goods they were allowed to export under the conditions of war trade agreements. Britain also was trying to posture its trade with Spain by if the two countries broke off from each other, Spain would have more to lose than Britain. Britain also leveraged Portugal through their centuries old alliance to supply Spain with key trade and food. Britain and Spain signed an agreement on March 18, 1940 that formalized this working trade agreement. This staved off further economic movement towards the Axis. The Allies also had other methods of intervention which ranged from direct intervention in internal Spanish politics by supporting the moderating influence of military generals opposed to the radical aims of the Falangists, to more trade maneuvering on the part of Britain and the United States.
Of course, the Axis were simultaneously courting Franco. On October 23, 1940 in the French seaside town of Hendaya on the border with Spain in Basque country, Franco and Hitler discussed Spain's involvement with the Axis. One of the elements over this signing, called The Hendaya Protocol, saw Spain enter into the Steel Pact which was created in March 1939 and was a political and military pact that Germany and Italy entered into. There were various aspects of this pact where one of them saw close cooperation between Spanish Guardia Civil and the Gestapo in terms of extradition of "anti-fascists" between Spain and the Axis. There were Gestapo in Spain itself too coordinating with the Falangists rooting out any lingering Republican elements. There was also close cooperation between the high ranking military staff of Spain and the Axis, intelligence sharing, and economic reprieves which were most likely the most important aspect to Franco who was still trying to institute recovery from the Civil war only a year and a half earlier. But even though this signing clearly showed a legal support for the Axis, Spain's entry into the war was still far from certain. Franco was not dumb. He knew his interests lie in recovering from the Civil War, not entangling Spain in a war he very well might end up on the losing side and lose everything he won during the Civil War. Spain's involvement would be determined by the course of the war.
There were plans for a invasion of Gibraltar by either Spain itself or allowing German troops to pass through Spain from occupied France. However, this was around the same time Hitler decided to institute Operation Barbarrossa in June 1941. With the war taking an easterly course, the pressure was somewhat lifted off of Spain to institute any real action. During this time Franco even stationed divisions along the Pyrenees to dissuade Hitler from occupying Spain.
The most tangible action of Spanish involvement was from the volunteer force known as the Division Azul or Blue Division which numbered around 20,000 Spanish volunteers who fought on the Eastern Front under the banner of anti-communism not necessarily anti-allies. But mounting pressure from external and internal forces saw the division recalled with most returning to Spain but some stayed and integrated into the SS. There was also some ally volunteers too with most having joined the French Foreign Legion at the outbreak of the war.
Another important aspect to address is that of Serrano Suñer (the father of former Spanish Prime Minister José María Aznar interestingly enough) who was Franco's Foreign Affairs Minister among other posts as well. He was a staunch Falangist and very pro-Axis. Here he is with Himmler in Madrid. He was courting Spain closer and closer to actual Spanish involvement until a military junta instituted more sway over Franco and took a decisively turn against the Falangists and Spainish involvement and General Francisco Gómez-Jordana Sousa replaced the fiery Suñer. Jordana was a career military man and was on the side of Franco in the Civil War. However, since he was a career soldier, he fought to keep Spanish troops from becoming directly involved in a war where there would be limited benefit to Spanish interest if any at all. He steered Spain away from future involvement with the Axis and began limiting the Falagists influence in foreign policy.
So to sum up why Spain did not involve fully in WWII, they had just finished major fighting from the Spanish Civil war and were in no shape to participate in another war when economic recovery was forefront in Franco's mind. The allies had instituted economic incentives to dissuade Franco from cutting off ally trade. And finally, internal politics with facisits idealists versus conservative pragmatists ultimately concluded with Spain not entering the war.
This is the main article I used with my response: The Spanish Neutrality during the Second World War by Antonio Marquina
Marquina, Antonio. “The Spanish Neutrality during the Second World War.” American University International Law Review 14, no. 1 (1998): 1-15.
Also, here is another really good source: Franco and Hitler: The Myth of Hendaye 1940 (you need a Jstor account)
I would also consult Stanley Payne's works, "The Franco Regime, 1936-1975", and "Franco and Hitler: Spain, Germany, and World War II".
Make sure to look at Christian Leitz's "Economic Relations Between Nazi Germany and Franco's Spain"