couple ways you could achieve this.
1. dados (yes this is routing a slot for the bottom to slide into)
2. biscuit joiner - cuts slots and filled with biscuits
3. dowels from the inside- similar to biscuits..sometimes very hard to line up, but done so they are not exposed.
4. dowels from the outside - this will show from the outside. line it up and drill holes from outside into the bottom piece, then stick dowels through and flush trim.