Stand one 2-by-4-by-48-inch stud at each corner of the pallet. Flush the sides of the studs flat against the sides of the pallet.
Shoot four staples through the bottom of each stud where they touch the pallet with a staple gun using 2 1/2-inch staples. You should now be looking at a pallet with four upright legs, one at each corner.
Measure the distances between the studs with a tape measure. Cut a stud for each side with the miter saw.
Hold the studs horizontally on each side at the top of the upright legs to span the distance between the legs. Flush them with the top and shoot four staples through each end of the horizontal studs to secure all of the horizontal pieces to the upright pieces. You should now be looking at a box framework with a railing.
Measure each side of the square perimeter on the top of the framework. Cut a stud for each side. Lay the studs flat on top of the railing to form a square handrail. Shoot staples down through the handrail into the railing around the perimeter spaced 6 inches apart.
Lay the studs flat on top of the framework. Shoot staples down through the top pieces into the horizontal railing pieces to form a handrail.