The police probably arrested you because they assumed that since you were with the person that was shoplifting, you were probably helping him. This is called circumstantial evidence, meaning that nobody saw you do it, but it can be inferred that you did it. An example would be if police knew that a store was robbed by a person in a clown suit and they find a person on the same street in a clown suit running away from the store. The police do not know that the person they found was the robber, but given the circumstances, he probably is the robber. However, whether or not there is enough evidence to convict you of being an accomplice to shoplifting in a court of law is a different story.