Reading through all these comments..
It seems like often you are setting him up to fail with long term goals that are just too much for him..
For example..
Walk to Burger King, behave IN burger king, eat food properly, don't run off, sit down, walk home from burger king...
And all that with the excitement of knowing hes going to burger king on the way there/during, and then afterwards well hes going back to sharing your attention and being constantly in trouble...
Replace that with.. going for a walk, where we hold mummys hand and lets count how many cars/cats/whatever we see whilst we walk.... OH! Look we are at burger king, lets see if we can sit and eat a burger, ... mm nice burgers, what shall we count on the way home...... count stuff on the way home....
This example is entirely up to you to find what fits for YOU but can you see the difference, firstly you HAVENT told him you are going to burger king, just a walk, you HAVENT told him he has to be 'good' (a very vague concept) for a vaguely long period of time, you HAVE given him a task to do WITH you.. and so on.
Break stuff down, make it MUCH easier for him to get it right and FAR harder for him to make a mistake.
I wont waffle on, but whenever you think you are having a hard time, keep in mind... so is he.
Someone else mentioned, yes this behaviour is attention seeking - but attention seeking like this is bourne out of a lack of the appropriate attention, it isn't indicative of a 'bad' child (or adult for that matter), it simply 'is'.