It's actually a bit of a nightmare; you (a member of the public) can only detain somebody if an offence was actually committed. If they are actually found not guilty (such as they just forgot to pay, see below), they can then take legal action for wrongful arrest.
This happened to a friend of mine, some years ago. He saw a woman leave the shop with items under her coat, he gave chase but the items were disposed of before he got to her and detained her.
She was found not guilty and the store also had to pay her compensation for the wrongful arrest.
In R v Self, Self had taken a chocolate bar and forgotten to pay for it. He left the shop and was 'arrested' by staff and a passer-by. In trying to get free he kicked them. He was originally found not guilty of theft, but guilty of assault. On appeal the assault conviction was also overturned as the arrest was not lawful because, with him being found not-guilty, no offence had been committed and a person is entitled to resist an unlawful attempt to detain them.
(The fact that he was an off-duty police officer may have helped his 'I forgot to pay' defence).