Before shipping the switch, configure interface vlan 1 to obtain a DHCP address. From the enable prompt:
interface vlan 1
ip address dhcp
Remember to write the configuration for persistence:
Now you can power down and ship the switch. Alternately, if you have shipped a switch with default IP address, logon to the remote router and assign IP address 10.10.10.2 or similar as a secondary address. Then you can telnet from the router CLI to the switch. This presumes that the switch allows telnet (it does by default).
From an ADTRAN router's config prompt:
interface eth 0/1 (or whatever you use for the LAN interface)
ip address 10.10.10.2 255.255.255.0 secondary
NOTE: the word secondary is very important.