What makes you think that the Earth should be the same shape as a planet?
Firstly, the earth itself is a planet. Earth-based optical observation and images recorded by the various space platforms have confirmed that
all the planets in our solar system are basically spherical. This common geometry is due to them all being formed by the process of planetary accretion.
Clouds of gaseous material and dust swirling around an emerging star (such as our sun) initially formed small pellets, which then collided with each and made even larger bodies called planetoids which, due to a specific combination of mass, density, temperature etc then coalesced at some point to form larger planets, with tracts of mostly empty space between them.
This is a representation of a so-called accretion disc:
The two largest planetoids are shown with smaller bodies colliding and combining with them. The sun is the bright body in the centre, with the clouds of gas swirling around it.
It's pretty obvious that this is the way all the planets in our solar system were formed, including the earth, as identical processes can be observed today using radio telescopes etc.