The Old Hollowed-Out-Book Trick
If the sides of the books will be visible, fold back the covers of the books on the left and right sides of the assembly before cutting. Build a plywood box for the secret compartment to fit the opening and glue the book parts to the box with construction adhesive. The disadvantage to this hidden compartement? You can see inside the box on low shelves, so you need to display it so the opening is above eye level.