It's easy tho. If you're a religious person and believe gambling is a sin you must stay away and never come back to gamble world again as you might get addicted again if you touch gambling. However, it's really hard for those who have missed much money from gamble to quit probably they will play again to recover the losses which is a wrong idea to do.
If you are a religious person for sure you will not be addicted in gambling in the first place. Let's assume that this people who have problem in gambling are victims of themselves. They are desperate to make more money so they might think gambling is the only way to solve the problem but they failed in the end, when the problem is money and you spend money to solve it but you failed, I guess that would result to a bigger problem.
People who have this kind of serious problem needs help and quitting is not easy without the help of people who truly care for them.
We can help this kind of person through diverting gambling activities with another kind of entertainment like going to theater or other enjoyable sports games. You can can bring the person to some concerts or going to beach of or having interest with other profitable investments, on example of that is trading.