It boils down to salary and education.
If education is required for the job and a fair salary is paid, corruption goes down.
I don't think that I have ever heard anything about something being smuggled into Norwegian prisons by the guards. I had a mate that did 12 years in Norway for premeditated murder, and has never mentioned that this happened during his stay in prison.