Am I handling this right ?

Ok guys. I'm in pediatric psychology, so I'd like to think that like I have my child under control but GIRLS I DONT. I've made so many mistakes with him and he hasn't had stability. Marriage, divorce, and my grandparents watching him who let him get away with murder. Due to all of this affecting his behavior, I have decided to stay home with him so I can correct it and get him on the right track. He LOVESSSS to get a rise out of anyone. You can yell, scream, use the scariest voice you have and he doesn't care. He loves it. And he's stubborn as all get out. In the grocery store, it's the worst. Because essentially, my hands are tied. I've tried timeout in the store and it didn't work. He knows I can't do much but get on to him verbally. So today, I decided to ignore all of his bad behavior and not let it fluster me. Nor was I going home. Because I feel like he needs to learn that he can't throw a fit and we just leave and he's in control of it. So today...I ignored it. And the more I ignored it, the more he FREAKED. Screamed, kicked, hit, crossed his arms and spit. He was furious. The only thing I got on to him for was touching stuff in the cart. I calmly told him that if he touches stuff in the cart, I'm holding his hands for 2 minutes. He thought it was a joke so the process begun. He touched, I held his hands. No other reaction other than a monotone "we don't touch things in the cart. If you touch things in the cart, I'm holding your hands." He just went crazy. I had to hold his hands at least every 5 minutes. He got worse and worse with no reaction. But from what I know from my career, it'll get worse before it gets better. He was trying EVERYTHING to get me angry. When I was calm and collected, it made me realize how much of a game I've made it into before that. He gets me angry, we have a battle of wills, it's over. His behavior showed me that it's clearly a back and forth to him. So I felt like ignoring it was best. Does anyone have any advice?