So does the speaker just kinda sit up there and you pray no one knocks it over?
The only way to make a speaker stand + bookshelf combination somewhat less likely to topple over is to make user that the base is larger than the speaker and very heavy. The goal is, if the stand tips over a little, the center of gravity should be such that it prevents a complete fall. For this to work, the speakers need to be completely bonded to the top plate (velcro, screws or blu-tack).
If the idea that someone will knock over the stand and speaker is even a consideration, it is then an eventuality that it
will fall. Mounting the speakers on the wall should be seriously considered.