I've gotten a lot better lately, but if that scenario happens I either have my brother (who I am generally with) run to the car to get them, in the case that we have a lot of groceries. Or we just carry them if we don't have much.
I think adding it to the mental checklist before leaving the car would help. "Okay, I have my keys, my phone, my wallet, AND my reusable bag. I'm good to go."