As far as I know, scientists have been able to see a lot of differently shaped galaxies in our visible universe through modern age telescopes. But I was wondering how it was possible to know how our own galaxy looks like without going out of it to see its shape?
We obviously do not know the shape exactly, but by measuring the positions of visible stars in our neighborhood We can tell that it is a spiral arm galaxy. In fact to the naked eye, the fact that we see a band of diffuse light called the Milky Way shows that we are in a flat type of galaxy and not in a globular cluster or an elliptical galaxy. There is a lot of evidence that the supermassive black hole that is at the center of our galaxy is located in Sagittarius A and we know the distance to that black hole. In addition we can measure the orbital velocity of stars rotating around the galaxy.
However, we can only see individual stars that are somewhat close to our position about 2/3 of the way out from the center of our galaxy - there is too much obscuring dust to see to the other side of the galaxy, for example. So we will always be somewhat limited in our ability to map out our galaxy exactly. However we do know enough to confidently say that we are in a spiral armed type of galaxy.
We have utilized a huge number of tools to determine the shape of our galaxy over our existence on this planet... the simplest of which is just looking up. It is clear that the milky way (that grayish streak through the sky) is flat, and because we know this blotch is caused by millions of distant stars and all the dust between us and them, we can safely guess that our galaxy is flat at the very least.
Outside of this obvious fact, it is also possible to use the directions and distances to observable stars to create a 3-D model of the galaxy.
Clearly there are also more complicated and accurate ways of mapping our galaxy, however... if you wish to read about the basic idea of how we moved from "it's flat" to "it's a spiral galaxy", I recommend this article or a basic google search.