It looks like they just laid a piece of fondant over the cake and trimmed all the way around. I just use scissors and cut the desired length then I take a ruler and gently press under the edge of the fondant to make a smooth line. If you can find a square box in the correct size you can place the fondant over the top trim and let dry but then the lid would be hard. Either way would work.
If you want it perfectly square you can mold the fondant over the outside of the square cake pan you are using to bake the cake. It should fit right over the cake if your fondant on your cake is not too thick. I hope this makes sense.
Cut a piece of fondant for the top of the cake and also some side panels. Let them dry for a couple of days...add tylose to fondant or use gumpaste. Trim the pieces according to the size of the cake. I use melted chocolate to adhere the pieces and have filled the gaps with either royal icing or with shortening...works very well. I learned this from sugarshacks video "boxes and bows".
Here is a finished cake using those techniques:
I did one in my pix, but I used gumpaste for it. You may want to invest in Sugarshack's Boxes and Bows DVD -- she has many different kinds of box cakes.
Thank you so much for the tips!!!!