To do this in a clean way, you will have to create a custom GNOME session file and a X Server session file (first, install openbox via sudo apt-get install openbox obconf menu
of course). Let's take a look at the two files currently present:
/usr/share/xsessions/pantheon.desktop
(X Server session file):
[Desktop Entry]
Name=Pantheon
Comment=This session provides elementary experience
Exec=gnome-session --session=pantheon
TryExec=wingpanel
Icon=
Type=Application
/usr/share/gnome-session/sessions/pantheon.session
(GNOME session file for Pantheon):
[GNOME Session]
Name=Pantheon
RequiredComponents=gala;gnome-settings-daemon;
FallbackSession=ubuntu
DesktopName=Pantheon
So, to create your own Openbox session, you need to create two new files:
/usr/share/xsessions/pantheon-openbox.desktop
[Desktop Entry]
Name=Pantheon-Openbox
Comment=This session provides a custom Openbox experience
Exec=gnome-session --session=pantheon-openbox
TryExec=wingpanel
Icon=
Type=Application
/usr/share/gnome-session/sessions/pantheon-openbox.session
[GNOME Session]
Name=Pantheon-Openbox
RequiredComponents=openbox;gnome-settings-daemon;
FallbackSession=ubuntu
DesktopName=Pantheon-Openbox
You are now able to select your custom session upon login.
Keep in mind that neither Wingpanel nor the GNOME technology stack is really created for working with such a session - while it might work, you can expect rough edges. I really would not recommend to use it that way, but it's an answer to your question. Use on your own risk, of course. There is no real benefit Openbox is offering over Gala, especially in terms of integration with technologies used by elementary OS.