Britain and France formed the Non-Intervention Committee in August 1936, trying to ensure that no foreign powers became involved in the uprising. 27 countries signed the Non-Intervention Agreement, including Germany. But despite this, Hitler continued to provide support to Spain by sending soldiers, tanks and ammunition through Portugal instead. Italy also signed the agreement, but just like Germany, continued to support the uprising.
Lieutenant Colonel Walther Warlimont, the German commander and military adviser to General Franco, suggested in October 1936 that a German Condor Legion should be formed, to fight in the war. The German Condor Legion consisted of a Bomber Group, a Fighter Group, a Reconnaissance Group, and a Seaplane Squadron – about 12 000 men. No one knows exactly what Germany provided to Spain during the war, but the list does include weapons, 16 000 German citizens (working as pilots, military advisors, artillery men, etc.), and over 100 fighter aircraft. The support came to about $215,000,000 in total. This shows that Germany was involved in the Spanish Civil War to quite a large extent. However, Italy was also aiding General Franco at the time, and supplied the Nationalists with over 60 000 troops and 700 aircraft (about $400,000,000 in total).
When they first became involved, Hitler argued that by aiding the rebellion, they would be saving Europe from communism. But he had other reasons too:
It would bring Germany closer to Italy. Hitler was in great need of allies against Britain and France, and hoped Italy would become one of them.
He knew that providing help to the Nationalists in Spain would give him an opportunity to test out his new military equipment, weapons and tactics in actual combat situations.
Hitler also hoped to ally with General Franco, and eventually be allowed to import Spanish copper and iron ore, which he greatly needed for his military expansion.
Germany was very much involved in the Spanish Civil War, not only to stop the spread of communism, but also because Hitler hoped that it would be beneficial to Germany in the long run.