Slightly over budget, but a much better setup for your budget.
https://pcpartpicker.com/list/LFGKwV
I wouldn't get Shoiep's suggested motherboard, RAM and GPU.
Mobo has 1 fan header, cpu fan header not included. And is Micro atx so not expandible if ever necessary.
Ryzen benefits from highspeed RAM so DDR4-3000 and up is a much better choice. You'll get a significant performance boost if you get 3000MHz RAM.
Also get the GTX1060 6GB, it's a lot more powerful than the GTX1050ti 4GB and will last you a lot longer.
I've recently built a similar Ryzen PC for a friend and he loves it.
Only difference is he has a Ryzen 5 1600, which isn't necessary, but a nice plus.