To have installed this correctly in the first place it should have been done before the top went on, you set the box in place, check it for level across the back, once level it get's attached to the wall by screwing into the studs.
(Make sure to predrill pilot holes through the back support rail, use at least 2-1/2" long screws, and never use sheetrock screws.)
Once attached to the wall it can be shimmed front to back and the gaps covered at the floor with 1/4 round or shoe molding, the side wall can be done with something like cove molding.
(Make sure to predrill pilot holes through the back support rail, use at least 2-1/2" long screws, and never use sheetrock screws.)
Once attached to the wall it can be shimmed front to back and the gaps covered at the floor with 1/4 round or shoe molding, the side wall can be done with something like cove molding.