You can buy threaded inserts (see video below ... Then he used a hot air gun to only heat the metal (so as to reduce the chance of deforming the actual part). Once it was hot (about 15 seconds ...
Threaded inserts are small metal (typically brass) inserts that are pressed into plastic to give a strong point of attachment for bolts and screws. These inserts are a huge step up from screwing ...