France formed a formal alliance with the United States in 1778 during the American Revolution.
The Treaty of Amity and Commerce and the Treaty of Alliance were signed in Paris on February 6, 1778. France had already been supplying secret assistance to the American rebels, but the American victory at Saratoga helped convince the French government that open intervention could weaken Britain.
French support included money, weapons, soldiers, naval forces, and diplomatic recognition. French troops and fleets played an important role in the Yorktown campaign of 1781, where British general Charles Cornwallis surrendered to combined American and French forces.
France paid a heavy financial price for the war, contributing to its fiscal crisis before the French Revolution. Spain also fought Britain from 1779, but it did not sign the same formal alliance treaty with the United States. That distinction makes France the canonical answer.