If you’re CDG originating, it’s quite easy to go into K. Tell the security staff you wish to shop. They’ll let you through and you’ll clear security.
When you want to go to L or M, walk back towards the security lanes and just to the left there is an exit back into the “beyond passport control but outside of security” area. From there, you can take the train as normal to L and M.
As you leave, read the signs carefully: I recall the signs indicate to go to L and M - as opposed to exit.