If Mance Rayder had to attack Castle Black to use the tunnel to get through the Wall and get out of the north, how did Stannis get his army across the Wall into the north without anyone knowing? If there was another way over the Wall wouldn't the wildings go that way too?
He didn't go over the wall. He sailed. Stannis has a fleet of ships. He boarded them all and disembarked North of the wall with his army. Shown with red is the shortest route Stannis could have taken. (n.b. the image gets the point across, but is missing the stop Stannis made in Braavos, just off this map to the East of the Vale of Arryn)
His Hand is a former pirate and a very good friend with Salladhor Saan who gives more ships to Stannis in exchange for riches. Stannis also gets lot of money from the Iron Bank and with that money is able to buy more ships to replace the ones he lost prior to going North of the wall.
Stannis landed his ships at Eastwatch-by-the-sea, and took a significant portion of the garrison north of the wall from there to hit Mance's army in the flank.
The reason that Mance didn't go to Eastwatch is the logistical difficulty of moving that many men an extra couple hundred miles. They felt they could go through the wall, with fewer casualties than another few days of White Walker raids, and so they tried to.
After the peace agreement, the Mammoths and Giants are sent to go around the wall at Eastwatch because they can't go through the wall at Castle Black easily.