Shallenberger then served the customary two year commitment serving on a government ship, assigned to the U.S. flagship "Lancaster" in the Mediterranean. He witnessed the Bombardment of Alexandria. He returned to the United States in 1883. Shallenberger then joined the Union Switch and Signal Company of Pittsburgh in 1884 under the management of George Westinghouse. The company was organizing an electric light department using alternating current and he became an electrician. Shallenberger ran the experiments of an alternating current apparatus which had been imported from Europe by Westinghouse. This research was the foundation for the organization of the Westinghouse Electric Company. He was appointed Chief Electrician and continued that position when the company in 1886 became the Westinghouse Electric and Manufacturing Company.