My question involves criminal law for the state of: Maryland
We were stopped at the door of walmart and two staffs asked us to follow him. They told us we have unpaid stuffs with us. We both were taken to a closed room and they checked us. We have the bill and showed them, but they said you have more stuffs than this. They kept asking continuously to show or they will call police to search us. Since I had done nothing, I took off jacket, and emptied all pockets and told them to check wherever they want. But my friend took out a $6.00 item (medicine for cold) from his pocket. Then the walmart staff asked IDs of both of us. I did not want to provide my ID because I did nothing wrong. But they told us that we were in team, and they threatened us to call Police and arrest. We did not want to make the case worse letting them call police. So, we turned in our IDs, and they took our pictures too. They also took our signatures on separate papers that state we are over 18 years.
What could be our worst case scenario, do we need to face court or have a lawyer if this gets blown up? I did not do anything wrong, I was just walking together with someone, whom they caught. Do I be responsible of any crime someone else does who happens to be with me while exiting the store?
The walmart staff said - they will do nothing with our pictures except keeping a record for themselves and they may send us a bill to pay the amount of medicine, as it was already open. Later, when I asked my friend "why you did that?" - The answer was - "I was feeling sick, and the box was already open, so I thought it would be OK to keep it in pocket."
I am desperately looking for some suggestions. Feeling really bad at whatever happened to us.

