Well ... to make a ROM, most people start with the stock ROM. So you start with the stock ROM and you ... er, you don't do anything, since you have what you want.
People aren't out there writing ROMs from scratch. I think that's what you were thinking.
Of course if the bootloader can't be unlocked, you can't just flash the ROM. Depending on the phone there are various things you can do. If you downloaded the ROM from the manufacturer's site, they probably have a tool that will flash it.
But why? If you flash the stock ROM over the stock ROM, you haven't changed anything, and you've taken a chance of bricking your phone and voiding the warranty.