It is the exact same thing, just different delivery method. You can purchase them legally because they are sold for research purposes only.
There is no regulation in the chemical research market however so make sure to stick with reputable companies such as ag-guys.com and sarms1.com