How to code a widget

when i try to make a widget i get redireted to “tools” page and never shown my file, i have the same issue with creating wallpapers