I was in Rome recently, and thought I should warn folks about a situation I found myself in. I was walking up the Circus Maximus when a foreign man (possibly Turkish, not sure) came up to me with a tourist map open asking for directions to the Vatican. I pointed it out on his map, and where we were, and what direction to go in, but all he kept saying was "no understand". Whilst I was trying to explain it to him again, two Italian men approached us and announced themselves as policemen. One flashed a badge, but I've no idea if it was real or not. They said they needed to ask a few questions and check a couple of things, as there were reports of fake money circulating. They asked the foreigner first to hand over his cash for examination, which he did, and they briefly looked at it and handed it back to him. They asked to see my cash as well, which I handed over, being suspicious but thinking they wouldn't just run off with it in a public place, although now I realize they could have said it was fake and decided to keep it "for evidence". Anyway they did hand it back to me, and they then asked the foreign guy for his bank card, because there are apparently fake ones being used in the area. Again the guy handed it over, and one of the alleged policemen got on the phone to someone and read out the numbers on the card. They then asked for the guy's pin number, which he gave. At which point I realized what was going on, and simply said "I'm not giving you my bank details" and walked off. They didn't try to stop me at all, just hung around for a minute, then split up again.
I've no idea if real Italian police have stop and search powers to examine people's belongings, but they were fairly convincing, using the foreign guy to show that they would hand back everything they looked at. But nobody, even a real policeman, should ever ask you for your pin number. DO NOT ever give that information out to anyone. If you find yourself in a similar situation, just do as I did and walk away, they won't want to draw attention to themselves by trying to stop you. If they do insist on keeping you back, threaten to call the real police, to check they are who they say they are.
Rome is my favourite place in the whole world, but as with many tourist spots, there are beggars, pickpockets and conmen looking to take advantage of the unwary tourist. Keep your wits about you and you'll be fine.