Being the opener for a more established act can be one of the best ways to make new fans. I can pinpoint specific opening gigs where I gained a large amount of fans who are still incredibly supportive to this day. I love opening slots for more established acts because I get to win new audiences over - my specialty. I sometimes prefer playing in front of a room of people who've never seen me before over a room full of fans. Sometimes.
In the early stages very few shows will be "opening" or "headlining." Technically you may be the first band of the night or the last, but unless the headliner is bringing in the serious numbers and the opener isn't, there isn't much separation here. One show you may play first, the next 3rd, the next last. The worst thing you can do is act like the headliner - especially in the early stages, when you're not really headlining but are playing with other local bands who will never forget your douchebaggery. Maybe you're on top this month but won't be for long if you keep the attitude up.
But when you do get an opening slot for a touring or established act make sure you approach it right. The number one rule about opening is to play a set one minute less than your allocated time slot. Meaning, if you get a 45 minute set, play 44 minutes, pack up your gear quickly and get off stage. I don't care how good you think you are or how much the audience is loving you, never play long. Even if this is a local show with 4 bands on the bill, it's just disrespectful to play longer than your time slot. This signals to the other bands that you think you're better than them and the audience prefers to hear you more than them. This may not actually be the case in your mind, but that's what this signals.
You have to understand the purpose of being selected to open an established act's show. The main reason you are on the bill is to bring people out. Even established acts that can get a few hundred out still would like an additional 50 that you could bring as the opener. You're expected to pull your weight somewhat when asked to open. It also looks good to the headliner's fans if your fans are in the crowd singing along and enjoying themselves. +50 Is The Magic Number
Sure the promoter or venue chose you to open the show because you have a similar sound or vibe or something like that, but the reason touring acts ask for a local opener and don't bring one themselves is because they need the audience buffer with the local's draw and promo help. Promoters have their ear to the ground; they are living in your city and they feel the pulse of the scene. If you go all out and promote the show that they asked you to open they'll see this and appreciate it tremendously (because it's unexpected) and they'll ask you to open more shows and give you more opportunities. They'll also be much more willing to help you if you need a venue in the future or a festival spot or something.
I was once asked to open a show for UK star, Sandi Thom, right when she blew up in the UK (but was virtually unknown here). The promoter told me straight up that I needed to bring people because tickets weren't really selling. This promoter was the biggest promoter in Minneapolis and this was the first opportunity he gave me. I went all out. I printed up 200 posters (on my dime) and plastered downtown Minneapolis and campus (and near where the promoter's office was of course). I made it sound like the biggest show of my career on my website and Facebook and I talked it up to everyone. I got about 60 people in there - this was very early on in my music career. The promoter was very happy and you know what the next show I was asked to open? The sold out 800 person Joshua Radin show.