In modern society, environmental pollution and climate change are considered the main problems affecting to increase in cancer cases, particularly skin cancer. In particular, skin cancer occurs when there is an overgrowth of abnormal cells in the skin. Additionally, Skin cancer can develop in areas faced with UV (Ultraviolet) radiation. But it can also form in areas that rarely see the light. Thus, many experiments in both medicine and computer areas were realized to diagnose and treat this illness. Specially. Computer vision is usually employed to detect and classify medical images. In this study, SMSC (Sampling in MobileNet for Skin Classification) was proposed as a framework designed for the classification of skin cancer using a fine-tuned MobileNet model and advanced sampling methods to handle imbalanced datasets. As a result, the performance metrics to classify seven classes of the HAM10000 dataset reached a surprise validation and test accuracy of 96.93% and 95.61%, respectively. In the outcome of the classification of benign and malignant, the proposed model also achieved an impressive average validation and test accuracy of 99.41% and 98.92%, respectively. Besides, SHAP (SHapley Additive exPlanations) was used to explain the model's decision through each pixel.