If you are only timebuilding, the ESTA is enough. However, if you are doing the IFR rating or multi engine flight training, you need a TSA backgroundcheck. You can apply for that here: flightschoolcandidates.gov but you will need information from the flightschool and they have to confirm that you are training with them. The current wait time is around 2 weeks, which is not bad.
If you want to fly solo, you also need to get a foreign based FAA license. For that you have to fill out a form and send it to the FAA. Just google: AC 8060-71
I would recommend you find a school that knows the procedures and helps you with this!