How do I secure an open-backed set of shelves to the wall?
If IKEA is nearby just go to the customer service (returns) section of the store and ask for a couple wall anchor kits. Otherwise, there are any number of kits available to order online or pick up at a local hardware store. I prefer the kind that use a flat nylon strap. Then you don't have to align everything perfect between wall and shelf. You attach one end to the furniture and the other end to the wall.

Attaching at the top is always preferable because it gives you the most mechanical advantage. If the open-back shelf is tall attach to the top of the top shelf as it won't be easily seen. For the shelf use a wood or metal screw as appropriate. For the wall use a wall anchor.

Keep the connection reasonably tight (don't go wild here) and the furniture can't exert much force on the anchor due to gravity when it tries to tip over.