Sand the first coat of joint compound and apply a second coat.
To support the shelving unit, install a block cut to the same height at the bottom of the front opening. This block is toe-nailed to the top of the window seat.
Set the shelving unit into place (Image 1) and lightly tapped the frame as needed for a tight, flush fit. Once it's even, use 2-1/2" trim screws to secure — three in each side (Image 2).
Wait until the second coat of joint compound has dried, then sand the surface.
Apply the final coat of joint compound (Image 3).