The Duchess of Cambridge urged those struggling with addiction to reach out for help after undertaking a virtual tour of a treatment centre.