What your friendd has done is theft, plain and simple,
He has taken an expensive product, removed the packaging and put it through the till as the cheaper loose bananas.
If I was him I would be careful about going back there in case they have spotted him doing this and are looking out for him again.
You wouldn't go into the supermarket and swap the heinz beans labels for shops own label just so you could get them cheaper, but that is basically what he has done. Theft.