How to flash official rom when custom rom allready on phone??? HTC


How to flash official rom when custom rom allready on phone???

my castmber flashed phone with custom rom useing twrp, but in this rom wifi is not working…..so castmber need again official rom in phone….

so is that posibal when custom rom in phone,,, directli reflash with officail fim without any risk ?????