It’s very essential to create packaging boxes with a size that is adequate for the product.
The box should also be rigid enough to withstand the product's weight while on the shelf.
The box can be rectangular or square shaped. But should be stable when placed on the shelf or when other items are placed in it.
If the packaging box is the type that customers can make use of, try to make it suitable for that purpose even as you consider protecting the content in a cost effective way.