Thanks Sir Quack and John. I wasn't sure about that rear bass port on a shelf and I didn't know about extending them beyond the edge but it makes sense. The shelves are 14" deep and the M3's are 8 1/4" so extending them 1/4" beyond the edge would give 6 inches of space behind them. Would that be enough for the bass port to work? I'm also hoping some reinforcement from the wall will help the bass a bit.

The shelves are 3" wide and I can leave those the speakers are on empty except for the speakers.