This morning on Shabbat, while putting a handkerchief and house keys in my pocket(here of course there is an eruv), with a 1000% mistake, and not even noticing, I also put a wallet (with money in it), in my pocket. I didn’t even notice that it was in my pocket until I was in Bet Knesset. I was very upset, but I didn’t know what to do. I left it in my pocket, continued praying, but made sure that I didn’t touch it. What should I have done?
Shalom, In such a situation the correct thing to do is to shake the wallet out of one's pocket, and leave it where it falls, as it is mukzah. However, there are several reasons to refrain from doing so that are applicable in your situation :- 1) you may suffer a loss if the wallet is left where it drops if someone else takes it, 2) you may be embarrassed to do so in the Bet Knesset, 3) it may be impractical to shake out the wallet from your pocket without first undressing and removing the pants, which is of course unacceptable in public. Therefore you should leave the wallet in your pocket, without using that pocket at all, until the first practical place and time to shake it out (probably when you get home, unless there is a room or place in your Bet Knesset you feel comfortable both shaking out the wallet and leaving it in). After shaking the wallet out it may be moved with your foot (i.e.kicked or shuffled along) to a place where it will be out of the way, such as under the bed etc