The directions need editing.  You cannot attach all four legs and then get the shelf in.  You need to leave one leg off, then the shelf is easy to place.  Then attach the final leg.