Just apply some glue on two adjacent sides and stick it to a wall corner (see pictures).
Step 1: Wash the Carton
Step 2: Find a Wall Corner
You should decide on the corner before the next step so that you know which sides to apply glue on.
Step 3: Apply Glue
You may experiment with regular glue first and if it doesnt hold, use a better glue.
Step 4: Affix the Carton to the Wall
Hold it for a while so that the glue dries.
Step 5: Variations
You can also make a shelf kind of arrangement with on carton over another (with few inches gap in between)