So the issue of self-medication is, again, hitting media outlets around the world. The issue seems to be under control here in the US, because, I think of the fear of litigation. Most drugstores here are owned by big supermarket chains and the last thing they would like would be to be sued because someone died of side effects for a non-prescribed drug - the risks are just too great.
Now, if you go to some developing country ( and I'll mention Brazil because that's where I'm from), the drugstores are usually owned by smaller entities or mom & pop operations. Owning a drugstore in Brazil is a cutthroat business - there's basically one drugstore per block and they ofter have to diversify selling vitamins and other non-prescription drugs. So when a schmo comes and asks for a controlled drug, the pharmacy owner will gladly sell it without prescription, knowing that if he or she doesn't the one down the road will, and he or she will not be able to compete.
So how do you fix this? Education you said? I hardly think so, it sounds good on paper but I believe the only way to fix this is through litigation. If there are any conditions that arise from your prescription-less drug you bought I think you should be able to sue the pharmacy for a lot of money.
Think that's unfair? Yes, I agree, but if the pharmacies have no incentive to enforce the law, this problem will continue indefinitely. Will people buy drugs from the black-market? They sure will, this is Brazil after all, but I think that increasing the litigation will at least force mainstream pharmacies to come out clean.