I purchased my motorhome out of state, used, but the process would have been much the same for a new one (excepting I don't have any warranty service to "worry" about).
Bought in New Hampshire, took the bill of sale and signed-over title to the nearest NH DMV office and got a $20 transit permit. Drove it home to Vermont, went to the Vermont DMV, paid state use tax and registration fees, and obtained a registration. No governmental hassles beyond the usual expected waits and joys of doing anything at any DMV office.
I did, of course, need to get insurance coverage before driving back to Vermont; that's a separate set of paperwork.
Take note that I only paid tax in my home state, which as I understand it is the usual but perhaps not universal way things work. (You might also note I didn't mention getting a title in Vermont; that's because Vermont among a few other states neither issues nor requires titles on vehicles older than fifteen years old.)