Hello Samer,
Most map viewers require a Mapping Server to serve either dynamic content or static tiles. ESRI's Flex API is no different, it requires REST endpoints (generally, although some other formats are acceptable) primarily created by ArcServer.
You will need to setup an ArcServer implementation before you can serve your own shapefiles to the Flex API.