How to secure an ikea Kallax shelf unit
My kids each have the red Kallax shelf system.  They each come with a long L bracket.  These should be installed on the third row up on the outside squares.  If you can't do it there go up to the 4th row.

The long part of the L goes on the wall.  For plaster you will need to use threaded anchors or toggle bolts.  You may have to put in 2 on each L bracket into the wall.  It would be advantageous if at least one of them went into a stud (then just use a wood screw - even a drywall screw).  

From there you screw in the short end into you shelf.  I have trim too and shelf actually sits a good 3/4 inch from wall - should not matter.  Also when screwing in the short end of the L bracket try to keep the shelf flat or slightly slightly tilted back.  Really the shelf should "sit" and you are not moving it during install.

Once you screw in bracket IKEA gives you bracket covers.  Throw those on and you are done.  Note that these brackets are not made to hang you shelf on the wall or anything crazy like that.  They are simply so a child can't tip the shelf over on them if climbing it.  I am sure I could go in their rooms and rip these off the walls.